Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Fix address calculation of Initrd

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Nobuhiro Iwamatsu and committed by
Paul Mundt
901c28c2 bde40898

+4 -3
+4 -3
arch/sh/kernel/setup.c
··· 135 135 goto disable; 136 136 } 137 137 138 - if (unlikely(start < PAGE_OFFSET)) { 139 - pr_err("initrd start < PAGE_OFFSET\n"); 138 + if (unlikely(start < __MEMORY_START)) { 139 + pr_err("initrd start (%08lx) < __MEMORY_START(%x)\n", 140 + start, __MEMORY_START); 140 141 goto disable; 141 142 } 142 143 ··· 158 157 /* 159 158 * Address sanitization 160 159 */ 161 - initrd_start = (unsigned long)__va(__pa(start)); 160 + initrd_start = (unsigned long)__va(start); 162 161 initrd_end = initrd_start + INITRD_SIZE; 163 162 164 163 memblock_reserve(__pa(initrd_start), INITRD_SIZE);