]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Fix sparc64 ramdisk handling
authorDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2006 06:15:38 +0000 (23:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 18:50:11 +0000 (11:50 -0700)
[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/mm/init.c

index 1539a8362b6f564bc3e49d9ba01f94827d012063..562e10af3fe061166d030b8e3d289a5f02d851b4 100644 (file)
@@ -902,8 +902,7 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
        if (sparc_ramdisk_image || sparc_ramdisk_image64) {
                unsigned long ramdisk_image = sparc_ramdisk_image ?
                        sparc_ramdisk_image : sparc_ramdisk_image64;
-               if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE)
-                       ramdisk_image -= KERNBASE;
+               ramdisk_image -= KERNBASE;
                initrd_start = ramdisk_image + phys_base;
                initrd_end = initrd_start + sparc_ramdisk_size;
                if (initrd_end > end_of_phys_memory) {