sh: Fix address calculation of Initrd
authorNobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Tue, 5 Oct 2010 08:16:08 +0000 (08:16 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Oct 2010 07:53:28 +0000 (16:53 +0900)
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/setup.c

index f24d0ea..4e27846 100644 (file)
@@ -135,8 +135,9 @@ void __init check_for_initrd(void)
                goto disable;
        }
 
-       if (unlikely(start < PAGE_OFFSET)) {
-               pr_err("initrd start < PAGE_OFFSET\n");
+       if (unlikely(start < __MEMORY_START)) {
+               pr_err("initrd start (%08lx) < __MEMORY_START(%x)\n",
+                       start, __MEMORY_START);
                goto disable;
        }
 
@@ -157,7 +158,7 @@ void __init check_for_initrd(void)
        /*
         * Address sanitization
         */
-       initrd_start = (unsigned long)__va(__pa(start));
+       initrd_start = (unsigned long)__va(start);
        initrd_end = initrd_start + INITRD_SIZE;
 
        memblock_reserve(__pa(initrd_start), INITRD_SIZE);