Commit 74f27655 authored by Yinghai Lu's avatar Yinghai Lu Committed by H. Peter Anvin

x86, mm: relocate initrd under all mem for 64bit

instead of under 4g.

For 64bit, we can use any mapped mem instead of low mem.
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1353123563-3103-17-git-send-email-yinghai@kernel.orgSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 66520ebc
...@@ -324,7 +324,7 @@ static void __init relocate_initrd(void) ...@@ -324,7 +324,7 @@ static void __init relocate_initrd(void)
char *p, *q; char *p, *q;
/* We need to move the initrd down into directly mapped mem */ /* We need to move the initrd down into directly mapped mem */
ramdisk_here = memblock_find_in_range(0, PFN_PHYS(max_low_pfn_mapped), ramdisk_here = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped),
area_size, PAGE_SIZE); area_size, PAGE_SIZE);
if (!ramdisk_here) if (!ramdisk_here)
...@@ -392,7 +392,7 @@ static void __init reserve_initrd(void) ...@@ -392,7 +392,7 @@ static void __init reserve_initrd(void)
initrd_start = 0; initrd_start = 0;
mapped_size = get_mem_size(max_low_pfn_mapped); mapped_size = get_mem_size(max_pfn_mapped);
if (ramdisk_size >= (mapped_size>>1)) if (ramdisk_size >= (mapped_size>>1))
panic("initrd too large to handle, " panic("initrd too large to handle, "
"disabling initrd (%lld needed, %lld available)\n", "disabling initrd (%lld needed, %lld available)\n",
...@@ -401,8 +401,7 @@ static void __init reserve_initrd(void) ...@@ -401,8 +401,7 @@ static void __init reserve_initrd(void)
printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image, printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image,
ramdisk_end - 1); ramdisk_end - 1);
if (ramdisk_end <= (max_low_pfn_mapped<<PAGE_SHIFT) && if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
PFN_DOWN(ramdisk_end))) { PFN_DOWN(ramdisk_end))) {
/* All are mapped, easy case */ /* All are mapped, easy case */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment