Skip to content

Commit 901c28c

Browse files
Nobuhiro Iwamatsupmundt
authored andcommitted
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>
1 parent bde4089 commit 901c28c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎arch/sh/kernel/setup.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ void __init check_for_initrd(void)
135135
goto disable;
136136
}
137137

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);
140141
goto disable;
141142
}
142143

@@ -157,7 +158,7 @@ void __init check_for_initrd(void)
157158
/*
158159
* Address sanitization
159160
*/
160-
initrd_start = (unsigned long)__va(__pa(start));
161+
initrd_start = (unsigned long)__va(start);
161162
initrd_end = initrd_start + INITRD_SIZE;
162163

163164
memblock_reserve(__pa(initrd_start), INITRD_SIZE);

0 commit comments

Comments
 (0)