When using CONFIG_NONLINEAR, a zone's mem_map isn't contiguous, and isn't allocated in the same place. This means that nonlinear doesn't really have a mem_map[] to pass into free_area_init_node() or memmap_init_zone() which makes any sense. So, this patch removes the 'struct page *mem_map' argument to both of those functions. All non-NUMA architectures just pass a NULL in there, which is ignored. I've cc'd any NUMA architecture's maintainer who's code I've touched. To replace the removed arguments, a call to pfn_to_page(node_start_pfn) is made. This is valid because all of the pfn_to_page() implementations rely only on the pgdats, which are already set up at this time. Plus, the pfn_to_page() method should work for any future nonlinear-type code. Finally, the patch creates a function: node_alloc_mem_map(), which I plan to effectively #ifdef out for nonlinear at some future date. Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well. arch/alpha/mm/numa.c | 2 +- arch/arm/mm/init.c | 2 +- arch/arm26/mm/init.c | 2 +- arch/cris/arch-v10/mm/init.c | 2 +- arch/i386/mm/discontig.c | 6 +++--- arch/ia64/mm/contig.c | 5 +++-- arch/ia64/mm/discontig.c | 4 ++-- arch/ia64/mm/init.c | 4 ++-- arch/mips/sgi-ip27/ip27-memory.c | 2 +- arch/parisc/mm/init.c | 2 +- arch/ppc64/mm/init.c | 2 +- arch/ppc64/mm/numa.c | 5 +++-- arch/sh/mm/init.c | 4 ++-- arch/sh64/mm/init.c | 2 +- arch/sparc/mm/srmmu.c | 2 +- arch/sparc/mm/sun4c.c | 2 +- arch/sparc64/mm/init.c | 2 +- arch/v850/kernel/setup.c | 2 +- arch/x86_64/mm/numa.c | 2 +- include/linux/mm.h | 4 ++-- mm/page_alloc.c | 37 ++++++++++++++++++++----------------- 21 files changed, 50 insertions(+), 45 deletions(-) -- Dave