aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-11-14 07:55:47 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-11-15 22:47:54 -0500
commit6d1e2c6c1a0b800473db4df8595c95745be548ea (patch)
treecfd29b7c7ca3d50f23070b31e2b3093112286a2b /arch/powerpc/kernel/prom_init.c
parentbbc24a25e29136a56cf5015ef23eb2c2e8828023 (diff)
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: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index b4fa6612749..cc584865b3d 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void)
1579 return; 1579 return;
1580 1580
1581 base = alloc_down(size, PAGE_SIZE, 0); 1581 base = alloc_down(size, PAGE_SIZE, 0);
1582 if (base == 0) { 1582 if (base == 0)
1583 prom_printf("RTAS allocation failed !\n"); 1583 prom_panic("Could not allocate memory for RTAS\n");
1584 return;
1585 }
1586 1584
1587 rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); 1585 rtas_inst = call_prom("open", 1, 1, ADDR("/rtas"));
1588 if (!IHANDLE_VALID(rtas_inst)) { 1586 if (!IHANDLE_VALID(rtas_inst)) {