Commit c4c3bbc5 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ppc64: Fix thinko in prom_init.c

(It's a real bug, but I suspect it doesn't trigger normally as we tend
to allocate the initrd low, but it should be fixed anyway).

This patch fixes an error in prom_init.c in the check for the initrd
location vs. the memory allocation mecanism. 
Signed-off-by: default avatarArnd Bergmann <arndb@de.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e7becb96
...@@ -678,8 +678,7 @@ static void __init prom_init_mem(void) ...@@ -678,8 +678,7 @@ static void __init prom_init_mem(void)
* point to after it * point to after it
*/ */
if (RELOC(prom_initrd_start)) { if (RELOC(prom_initrd_start)) {
if ((RELOC(prom_initrd_start) + RELOC(prom_initrd_end)) if (RELOC(prom_initrd_end) > RELOC(alloc_bottom))
> RELOC(alloc_bottom))
RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment