aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup_32.c10
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();