diff options
-rw-r--r-- | arch/x86/kernel/setup.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 68dffeceb193..94f922a73c54 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -324,7 +324,7 @@ static void __init relocate_initrd(void) | |||
324 | char *p, *q; | 324 | char *p, *q; |
325 | 325 | ||
326 | /* We need to move the initrd down into directly mapped mem */ | 326 | /* We need to move the initrd down into directly mapped mem */ |
327 | ramdisk_here = memblock_find_in_range(0, PFN_PHYS(max_low_pfn_mapped), | 327 | ramdisk_here = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped), |
328 | area_size, PAGE_SIZE); | 328 | area_size, PAGE_SIZE); |
329 | 329 | ||
330 | if (!ramdisk_here) | 330 | if (!ramdisk_here) |
@@ -392,7 +392,7 @@ static void __init reserve_initrd(void) | |||
392 | 392 | ||
393 | initrd_start = 0; | 393 | initrd_start = 0; |
394 | 394 | ||
395 | mapped_size = get_mem_size(max_low_pfn_mapped); | 395 | mapped_size = get_mem_size(max_pfn_mapped); |
396 | if (ramdisk_size >= (mapped_size>>1)) | 396 | if (ramdisk_size >= (mapped_size>>1)) |
397 | panic("initrd too large to handle, " | 397 | panic("initrd too large to handle, " |
398 | "disabling initrd (%lld needed, %lld available)\n", | 398 | "disabling initrd (%lld needed, %lld available)\n", |
@@ -401,8 +401,7 @@ static void __init reserve_initrd(void) | |||
401 | printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image, | 401 | printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image, |
402 | ramdisk_end - 1); | 402 | ramdisk_end - 1); |
403 | 403 | ||
404 | if (ramdisk_end <= (max_low_pfn_mapped<<PAGE_SHIFT) && | 404 | if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image), |
405 | pfn_range_is_mapped(PFN_DOWN(ramdisk_image), | ||
406 | PFN_DOWN(ramdisk_end))) { | 405 | PFN_DOWN(ramdisk_end))) { |
407 | /* All are mapped, easy case */ | 406 | /* All are mapped, easy case */ |
408 | /* | 407 | /* |