Skip to content

Commit

Permalink
[SPARC32]: Fix bogus ramdisk image location check.
Browse files Browse the repository at this point in the history
This mirrors sparc64 commit 715a0ec

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>
  • Loading branch information
Mark Fortescue authored and David S. Miller committed Aug 15, 2007
1 parent 3ac4c94 commit f642b26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/sparc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f642b26

Please sign in to comment.