On 03/24/2010 12:43 AM, Benjamin Herrenschmidt wrote: > On Tue, 2010-03-23 at 22:54 -0700, Yinghai Lu wrote: >> if the array can be doubled and have old one copied to new one. >> then we don't change lmb.c too much. >> >> new early_res.c exend lmb. and another half already works with x86 to >> replace bootmem. >> >> will check if i can produce one patch to make powerpc to reuse >> early_res/nobootmem > > While at it, can you rename early_res to something that doesn't > suck ? :-) > ok, please check following renaming is ok to you. the api from linux/early_res.h #ifndef _LINUX_EARLY_RES_H #define _LINUX_EARLY_RES_H #ifdef __KERNEL__ extern void reserve_early(u64 start, u64 end, char *name); extern void free_early(u64 start, u64 end); void lmb_reserved_to_bootmem(u64 start, u64 end); u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end, u64 size, u64 align); void add_lmb_memory(u64 start, u64 end); u64 find_lmb_area(u64 start, u64 end, u64 size, u64 align); u64 find_lmb_area_size(u64 start, u64 *sizep, u64 align); u64 find_lmb_area_node(int nid, u64 start, u64 end, u64 size, u64 align); void lmb_register_active_regions(int nid, unsigned long start_pfn, unsigned long last_pfn); u64 lmb_hole_size(u64 start, u64 end); u64 get_max_mapped(void); struct range; int get_free_all_memory_range(struct range **rangep, int nodeid); #endif /* __KERNEL__ */ #endif /* _LINUX_EARLY_RES_H */ ====> extern void reserve_lmb(u64 start, u64 end, char *name); extern void free_lmb(u64 start, u64 end); void lmb_reserved_to_bootmem(u64 start, u64 end); u64 __find_lmb_area(u64 ei_start, u64 ei_last, u64 start, u64 end, u64 size, u64 align); void add_lmb_memory(u64 start, u64 end); u64 find_lmb_area(u64 start, u64 end, u64 size, u64 align); u64 find_lmb_area_size(u64 start, u64 *sizep, u64 align); u64 find_lmb_area_node(int nid, u64 start, u64 end, u64 size, u64 align); void lmb_register_active_regions(int nid, unsigned long start_pfn, unsigned long last_pfn); u64 lmb_hole_size(u64 start, u64 end); u64 get_max_mapped(void); struct range; int get_free_all_memory_range(struct range **rangep, int nodeid); Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html