diff options
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r-- | arch/mips/kernel/setup.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index c538d6e01b7b..a842154d57dc 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -300,12 +300,13 @@ static void __init bootmem_init(void) | |||
300 | int i; | 300 | int i; |
301 | 301 | ||
302 | /* | 302 | /* |
303 | * Init any data related to initrd. It's a nop if INITRD is | 303 | * Sanity check any INITRD first. We don't take it into account |
304 | * not selected. Once that done we can determine the low bound | 304 | * for bootmem setup initially, rely on the end-of-kernel-code |
305 | * of usable memory. | 305 | * as our memory range starting point. Once bootmem is inited we |
306 | * will reserve the area used for the initrd. | ||
306 | */ | 307 | */ |
307 | reserved_end = max(init_initrd(), | 308 | init_initrd(); |
308 | (unsigned long) PFN_UP(__pa_symbol(&_end))); | 309 | reserved_end = (unsigned long) PFN_UP(__pa_symbol(&_end)); |
309 | 310 | ||
310 | /* | 311 | /* |
311 | * max_low_pfn is not a number of pages. The number of pages | 312 | * max_low_pfn is not a number of pages. The number of pages |
@@ -362,6 +363,14 @@ static void __init bootmem_init(void) | |||
362 | max_low_pfn = PFN_DOWN(HIGHMEM_START); | 363 | max_low_pfn = PFN_DOWN(HIGHMEM_START); |
363 | } | 364 | } |
364 | 365 | ||
366 | #ifdef CONFIG_BLK_DEV_INITRD | ||
367 | /* | ||
368 | * mapstart should be after initrd_end | ||
369 | */ | ||
370 | if (initrd_end) | ||
371 | mapstart = max(mapstart, (unsigned long)PFN_UP(__pa(initrd_end))); | ||
372 | #endif | ||
373 | |||
365 | /* | 374 | /* |
366 | * Initialize the boot-time allocator with low memory only. | 375 | * Initialize the boot-time allocator with low memory only. |
367 | */ | 376 | */ |