Before this patch, the sparse code is only hooked into the NUMA subarchitectures. This patch makes sure that normal, contiguous systems get their memory put into sparse correctly. This allows for fake memory hotplug. Signed-off-by: Dave Hansen --- memhotplug-dave/arch/i386/kernel/setup.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) diff -puN arch/i386/kernel/setup.c~E1-for-debugging-memory_present-for-contig-systems arch/i386/kernel/setup.c --- memhotplug/arch/i386/kernel/setup.c~E1-for-debugging-memory_present-for-contig-systems 2005-07-28 13:50:27.000000000 -0700 +++ memhotplug-dave/arch/i386/kernel/setup.c 2005-07-28 13:50:27.000000000 -0700 @@ -1121,11 +1121,19 @@ static unsigned long __init setup_memory printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", pages_to_mb(highend_pfn - highstart_pfn)); #endif + /* + * This will only work for contiguous memory systems. + * + * Leave the evil #ifdef as a big FIXME until you do + * this properly + */ +#ifdef CONFIG_SPARSEMEM + memory_present(/*node*/0, /*start_pfn*/0, max_pfn); +#endif printk(KERN_NOTICE "%ldMB LOWMEM available.\n", pages_to_mb(max_low_pfn)); setup_bootmem_allocator(); - return max_low_pfn; } _