VM: remove dead code

This commit is contained in:
Ben Gras 2012-09-18 18:40:13 +02:00
parent d526f1a0db
commit aa82e375c6
2 changed files with 0 additions and 51 deletions

View file

@ -35,8 +35,6 @@ void mem_init(struct memory *chunks);
/* utility.c */ /* utility.c */
void get_mem_chunks(struct memory *mem_chunks); void get_mem_chunks(struct memory *mem_chunks);
void reserve_proc_mem(struct memory *mem_chunks, struct mem_map
*map_ptr);
int vm_isokendpt(endpoint_t ep, int *proc); int vm_isokendpt(endpoint_t ep, int *proc);
int get_stack_ptr(int proc_nr, vir_bytes *sp); int get_stack_ptr(int proc_nr, vir_bytes *sp);
int do_info(message *); int do_info(message *);

View file

@ -72,55 +72,6 @@ struct memory *mem_chunks; /* store mem chunks here */
} }
} }
#if 0
/*===========================================================================*
* reserve_proc_mem *
*===========================================================================*/
void reserve_proc_mem(mem_chunks, map_ptr)
struct memory *mem_chunks; /* store mem chunks here */
struct mem_map *map_ptr; /* memory to remove */
{
/* Remove server memory from the free memory list.
*/
struct memory *memp;
for (memp = mem_chunks; memp < &mem_chunks[NR_MEMS]; memp++) {
if(memp->base <= map_ptr[T].mem_phys
&& memp->base+memp->size >= map_ptr[T].mem_phys)
{
phys_bytes progsz = map_ptr[S].mem_phys
- map_ptr[T].mem_phys;
phys_bytes progend = map_ptr[S].mem_phys;
if (memp->base == map_ptr[T].mem_phys) {
memp->base += progsz;
memp->size -= progsz;
} else {
struct memory *mempr;
/* have to split mem_chunks */
if(mem_chunks[NR_MEMS-1].size>0)
panic("reserve_proc_mem: can't find free mem_chunks to map: 0x%lx",
map_ptr[T].mem_phys);
for(mempr=&mem_chunks[NR_MEMS-1];mempr>memp;mempr--) {
*mempr=*(mempr-1);
}
assert(memp < &mem_chunks[NR_MEMS-1]);
(memp+1)->base = progend;
(memp+1)->size = memp->base + memp->size
- progend;
memp->size = map_ptr[T].mem_phys - memp->base;
}
break;
}
}
if (memp >= &mem_chunks[NR_MEMS]) {
panic("reserve_proc_mem: can't find map in mem_chunks: 0x%lx",
map_ptr[T].mem_phys);
}
}
#endif
/*===========================================================================* /*===========================================================================*
* vm_isokendpt * * vm_isokendpt *
*===========================================================================*/ *===========================================================================*/