From: Mark Fortescue Date: Wed, 15 Aug 2007 01:22:03 +0000 (-0700) Subject: [SPARC32]: Fix bogus ramdisk image location check. X-Git-Tag: v2.6.23-rc4~127^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f642b263800e6e57c377d630be6d2a999683b579;p=linux-2.6 [SPARC32]: Fix bogus ramdisk image location check. This mirrors sparc64 commit 715a0ecc29c850d2b2f76e1803d3f22cd5a0ac0d sparc_ramdisk_image should always be decremented by KERNBASE. Signed-off-by: Mark Fortescue Signed-off-by: David S. Miller --- diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index a1bef07755..c13e6cd279 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -206,8 +206,7 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) #ifdef CONFIG_BLK_DEV_INITRD /* Now have to check initial ramdisk, so that bootmap does not overwrite it */ if (sparc_ramdisk_image) { - if (sparc_ramdisk_image >= (unsigned long)&_end - 2 * PAGE_SIZE) - sparc_ramdisk_image -= KERNBASE; + sparc_ramdisk_image -= KERNBASE; initrd_start = sparc_ramdisk_image + phys_base; initrd_end = initrd_start + sparc_ramdisk_size; if (initrd_end > end_of_phys_memory) {