From: Magnus Damm Fix single node sparsemem support. In the case when multiple nodes are used, setup_memory() in arch/i386/mm/discontig.c calls get_memcfg_numa() which calls memory_present(). The single node case with setup_memory() in arch/i386/kernel/setup.c does not call memory_present() without this patch, which breaks single node support. Signed-off-by: Magnus Damm Cc: Andy Whitcroft Cc: Bob Picco Cc: Dave Hansen Signed-off-by: Andrew Morton --- arch/i386/Kconfig | 4 ++-- arch/i386/kernel/setup.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff -puN arch/i386/Kconfig~i386-single-node-sparsemem-fix arch/i386/Kconfig --- devel/arch/i386/Kconfig~i386-single-node-sparsemem-fix 2005-09-07 20:09:59.000000000 -0700 +++ devel-akpm/arch/i386/Kconfig 2005-09-07 20:09:59.000000000 -0700 @@ -762,7 +762,6 @@ config NUMA depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)) default n if X86_PC default y if (X86_NUMAQ || X86_SUMMIT) - select SPARSEMEM_STATIC # Need comments to help the hapless user trying to turn on NUMA support comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" @@ -801,7 +800,8 @@ config ARCH_DISCONTIGMEM_DEFAULT config ARCH_SPARSEMEM_ENABLE def_bool y - depends on NUMA + depends on NUMA || (X86_PC && EXPERIMENTAL) + select SPARSEMEM_STATIC config ARCH_SELECT_MEMORY_MODEL def_bool y diff -puN arch/i386/kernel/setup.c~i386-single-node-sparsemem-fix arch/i386/kernel/setup.c --- devel/arch/i386/kernel/setup.c~i386-single-node-sparsemem-fix 2005-09-07 20:09:59.000000000 -0700 +++ devel-akpm/arch/i386/kernel/setup.c 2005-09-07 20:09:59.000000000 -0700 @@ -1127,6 +1127,9 @@ static unsigned long __init setup_memory printk(KERN_NOTICE "%ldMB LOWMEM available.\n", pages_to_mb(max_low_pfn)); +#ifdef CONFIG_SPARSEMEM + memory_present(0, 0, max_pfn); +#endif setup_bootmem_allocator(); return max_low_pfn; _