Commit 6d1e2c6c authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: panic if we can't instantiate RTAS

I had to debug a strange situation where all manner of things were
failing. SMT threads, storage and network were all completely broken.

The root cause was we couldn't find enough memory to instantiate RTAS -
this was a network install so the initrd was huge.

Instead of limping along and failing in mysterious ways we should just
panic up front if RTAS exists and we can't allocate space for it.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent bbc24a25
...@@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void) ...@@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void)
return; return;
base = alloc_down(size, PAGE_SIZE, 0); base = alloc_down(size, PAGE_SIZE, 0);
if (base == 0) { if (base == 0)
prom_printf("RTAS allocation failed !\n"); prom_panic("Could not allocate memory for RTAS\n");
return;
}
rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); rtas_inst = call_prom("open", 1, 1, ADDR("/rtas"));
if (!IHANDLE_VALID(rtas_inst)) { if (!IHANDLE_VALID(rtas_inst)) {
......
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