aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-09-27 02:14:21 -0400
committerDavid S. Miller <davem@davemloft.net>2006-09-27 02:14:21 -0400
commit715a0ecc29c850d2b2f76e1803d3f22cd5a0ac0d (patch)
treee174bca291d145b4b2128b9dd59b6e73e596b457 /arch/sparc64
parente531dcc568ca326428158e9574b8560572b8ae28 (diff)
[SPARC64]: Kill bogus check from bootmem_init().
There is an ancient and totally incorrect sanity check being done on the ramdisk location. The check assumes that the kernel is always loaded to physical address zero, which is wrong. It was trying to validate the ramdisk value by saying that if it fell within the kernel image address range it must be wrong. Anyways, kill this because it actually creates problems. The 'ramdisk_image' should always be adjusted down by KERNBASE. SILO can easily put the ramdisk in a location which causes this test to trigger, breaking things. [ Based almost entirely upon a patch from Ben Collins. ] Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/mm/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index dcba4e6ab570..09cb7fccc03a 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -920,8 +920,7 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
920 if (sparc_ramdisk_image || sparc_ramdisk_image64) { 920 if (sparc_ramdisk_image || sparc_ramdisk_image64) {
921 unsigned long ramdisk_image = sparc_ramdisk_image ? 921 unsigned long ramdisk_image = sparc_ramdisk_image ?
922 sparc_ramdisk_image : sparc_ramdisk_image64; 922 sparc_ramdisk_image : sparc_ramdisk_image64;
923 if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) 923 ramdisk_image -= KERNBASE;
924 ramdisk_image -= KERNBASE;
925 initrd_start = ramdisk_image + phys_base; 924 initrd_start = ramdisk_image + phys_base;
926 initrd_end = initrd_start + sparc_ramdisk_size; 925 initrd_end = initrd_start + sparc_ramdisk_size;
927 if (initrd_end > end_of_phys_memory) { 926 if (initrd_end > end_of_phys_memory) {