diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-24 15:18:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:32 -0400 |
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) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | /* We need to move the initrd down into lowmem */ | 228 | /* We need to move the initrd down into lowmem */ |
229 | ramdisk_target = max_pfn_mapped<<PAGE_SHIFT; | 229 | ramdisk_here = find_e820_area(0, end_of_lowmem, ramdisk_size, |
230 | ramdisk_here = find_e820_area(min(ramdisk_target, end_of_lowmem>>1), | 230 | PAGE_SIZE); |
231 | end_of_lowmem, ramdisk_size, | ||
232 | PAGE_SIZE); | ||
233 | 231 | ||
234 | if (ramdisk_here == -1ULL) | 232 | if (ramdisk_here == -1ULL) |
235 | panic("Cannot find place for new RAMDISK of size %lld\n", | 233 | panic("Cannot find place for new RAMDISK of size %lld\n", |
@@ -433,8 +431,12 @@ void __init setup_arch(char **cmdline_p) | |||
433 | max_pfn = e820_end_of_ram(); | 431 | max_pfn = e820_end_of_ram(); |
434 | } | 432 | } |
435 | 433 | ||
434 | /* max_low_pfn get updated here */ | ||
436 | find_low_pfn_range(); | 435 | find_low_pfn_range(); |
437 | 436 | ||
437 | /* max_pfn_mapped is updated here */ | ||
438 | init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); | ||
439 | |||
438 | reserve_initrd(); | 440 | reserve_initrd(); |
439 | 441 | ||
440 | dmi_scan_machine(); | 442 | dmi_scan_machine(); |