提交 901c28c2 编写于 作者: N Nobuhiro Iwamatsu 提交者: Paul Mundt

sh: Fix address calculation of Initrd

Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 bde40898
...@@ -135,8 +135,9 @@ void __init check_for_initrd(void) ...@@ -135,8 +135,9 @@ void __init check_for_initrd(void)
goto disable; goto disable;
} }
if (unlikely(start < PAGE_OFFSET)) { if (unlikely(start < __MEMORY_START)) {
pr_err("initrd start < PAGE_OFFSET\n"); pr_err("initrd start (%08lx) < __MEMORY_START(%x)\n",
start, __MEMORY_START);
goto disable; goto disable;
} }
...@@ -157,7 +158,7 @@ void __init check_for_initrd(void) ...@@ -157,7 +158,7 @@ void __init check_for_initrd(void)
/* /*
* Address sanitization * Address sanitization
*/ */
initrd_start = (unsigned long)__va(__pa(start)); initrd_start = (unsigned long)__va(start);
initrd_end = initrd_start + INITRD_SIZE; initrd_end = initrd_start + INITRD_SIZE;
memblock_reserve(__pa(initrd_start), INITRD_SIZE); memblock_reserve(__pa(initrd_start), INITRD_SIZE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册