[SPARC32]: Fix bogus ramdisk image location check.
authorMark Fortescue <mark@mtfhpc.demon.co.uk>
Wed, 15 Aug 2007 01:22:03 +0000 (18:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Aug 2007 01:22:03 +0000 (18:22 -0700)
This mirrors sparc64 commit 715a0ecc29c850d2b2f76e1803d3f22cd5a0ac0d

sparc_ramdisk_image should always be decremented by KERNBASE.

Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/init.c

index a1bef07755a920076d186880269af56f5f9348db..c13e6cd279ac0bae8ad49043b9c11f73310f349e 100644 (file)
@@ -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) {