diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-24 12:18:14 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 13:10:32 +0200 |
commit | 4e29684c40f2a332ba4d05f6482d5807725d5624 (patch) | |
tree | 297bc3f125ce07a915f7b2cf42c1f32a82453b42 /arch/x86/kernel/setup_32.c | |
parent | c3c2fee38462fa34b90e0a5427c7fc564bb5c96c (diff) |
x86: introduce init_memory_mapping for 32bit #1
... so can we use mem below max_low_pfn earlier.
this allows us to move several functions more early instead of waiting
to after paging_init.
That includes moving relocate_initrd() earlier in the bootup, and kva
related early setup done in initmem_init. (in followup patches)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_32.c')
-rw-r--r-- | arch/x86/kernel/setup_32.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index bba8d57bd7d8..03007cada0d1 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -226,10 +226,8 @@ static void __init reserve_initrd(void) } /* We need to move the initrd down into lowmem */ - ramdisk_target = max_pfn_mapped<<PAGE_SHIFT; - ramdisk_here = find_e820_area(min(ramdisk_target, end_of_lowmem>>1), - end_of_lowmem, ramdisk_size, - PAGE_SIZE); + ramdisk_here = find_e820_area(0, end_of_lowmem, ramdisk_size, + PAGE_SIZE); if (ramdisk_here == -1ULL) panic("Cannot find place for new RAMDISK of size %lld\n", @@ -433,8 +431,12 @@ void __init setup_arch(char **cmdline_p) max_pfn = e820_end_of_ram(); } + /* max_low_pfn get updated here */ find_low_pfn_range(); + /* max_pfn_mapped is updated here */ + init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); + reserve_initrd(); dmi_scan_machine(); |