--- sparsemem-dave/arch/i386/kernel/setup.c | 59 +++++++++++++++----------------- 1 files changed, 29 insertions(+), 30 deletions(-) diff -puN arch/i386/kernel/setup.c~2_7_060_refactor_setup_memory_i386-cleanup arch/i386/kernel/setup.c --- sparsemem/arch/i386/kernel/setup.c~2_7_060_refactor_setup_memory_i386-cleanup 2004-10-28 10:23:29.000000000 -0700 +++ sparsemem-dave/arch/i386/kernel/setup.c 2004-10-28 10:24:27.000000000 -0700 @@ -1014,36 +1014,6 @@ static void __init reserve_ebda_region(v reserve_bootmem(addr, PAGE_SIZE); } -#ifndef CONFIG_DISCONTIGMEM -void __init setup_bootmem_allocator(void); -static unsigned long __init setup_memory(void) -{ - /* - * partially used pages are not usable - thus - * we are rounding upwards: - */ - min_low_pfn = PFN_UP(init_pg_tables_end); - - find_max_pfn(); - - max_low_pfn = find_max_low_pfn(); - -#ifdef CONFIG_HIGHMEM - highstart_pfn = highend_pfn = max_pfn; - if (max_pfn > max_low_pfn) { - highstart_pfn = max_low_pfn; - } - printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", - pages_to_mb(highend_pfn - highstart_pfn)); -#endif - printk(KERN_NOTICE "%ldMB LOWMEM available.\n", - pages_to_mb(max_low_pfn)); - - setup_bootmem_allocator(); - return max_low_pfn; -} -#endif /* !CONFIG_DISCONTIGMEM */ - void __init setup_bootmem_allocator(void) { unsigned long bootmap_size; @@ -1119,6 +1089,35 @@ void __init setup_bootmem_allocator(void #endif } +#ifndef CONFIG_DISCONTIGMEM +static unsigned long __init setup_memory(void) +{ + /* + * partially used pages are not usable - thus + * we are rounding upwards: + */ + min_low_pfn = PFN_UP(init_pg_tables_end); + + find_max_pfn(); + + max_low_pfn = find_max_low_pfn(); + +#ifdef CONFIG_HIGHMEM + highstart_pfn = highend_pfn = max_pfn; + if (max_pfn > max_low_pfn) { + highstart_pfn = max_low_pfn; + } + printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", + pages_to_mb(highend_pfn - highstart_pfn)); +#endif + printk(KERN_NOTICE "%ldMB LOWMEM available.\n", + pages_to_mb(max_low_pfn)); + + setup_bootmem_allocator(); + return max_low_pfn; +} +#endif /* !CONFIG_DISCONTIGMEM */ + /* * Request address space for all standard RAM and ROM resources * and also for regions reported as reserved by the e820. _