提交 f642b263 编写于 作者: M Mark Fortescue 提交者: David S. Miller

[SPARC32]: Fix bogus ramdisk image location check.

This mirrors sparc64 commit 715a0ecc

sparc_ramdisk_image should always be decremented by KERNBASE.
Signed-off-by: NMark Fortescue <mark@mtfhpc.demon.co.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3ac4c949
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册