summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-28 22:51:46 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-29 09:04:59 +0200
commit7680057cc4c7d9caada12767831bfd9738dd7b43 (patch)
treec6bc6729a25f1abcad6186bfd1956b15b93757e6 /arch/powerpc/kernel/prom_init.c
parentpowerpc/perf_event: Fix Power6 L1 cache read & write event codes] (diff)
downloadlinux-7680057cc4c7d9caada12767831bfd9738dd7b43.tar.xz
linux-7680057cc4c7d9caada12767831bfd9738dd7b43.zip
powerpc: Don't try OPAL takeover on old 970 blades
The firmware on old 970 blades supports some kind of takeover called "TNK takeover" which will crash if we try to probe for OPAL takeover, so don't do it. 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index e96f5d0d2c78..b4fa66127495 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1313,6 +1313,16 @@ static void prom_query_opal(void)
{
long rc;
+ /* We must not query for OPAL presence on a machine that
+ * supports TNK takeover (970 blades), as this uses the same
+ * h-call with different arguments and will crash
+ */
+ if (PHANDLE_VALID(call_prom("finddevice", 1, 1,
+ ADDR("/tnk-memory-map")))) {
+ prom_printf("TNK takeover detected, skipping OPAL check\n");
+ return;
+ }
+
prom_printf("Querying for OPAL presence... ");
rc = opal_query_takeover(&RELOC(prom_opal_size),
&RELOC(prom_opal_align));