aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-07-07 16:08:41 -0500
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-12 13:07:21 +1000
commitc0bdf1dac1dd97ed6cbf8008edbcac8dc6e23874 (patch)
treefeeeda40bdd801b3647e708f843aeaa2108def0a /core
parent537b7a705df795d888852b2cb4fbe535b4d534f4 (diff)
downloadskiboot-c0bdf1dac1dd97ed6cbf8008edbcac8dc6e23874.zip
skiboot-c0bdf1dac1dd97ed6cbf8008edbcac8dc6e23874.tar.gz
skiboot-c0bdf1dac1dd97ed6cbf8008edbcac8dc6e23874.tar.bz2
cpu: Better handle unknown flags in opal_reinit_cpus()
At the moment, if we get passed flags we don't know about, we return OPAL_UNSUPPORTED but we still perform whatever actions was requied by the flags we do support. Additionally, on P8, we attempt a SLW re-init which hasn't been supported since Murano DD2.0 and will crash your system. It's too late to fix on existing systems so Linux will have to be careful at least on P8, but to avoid future issues let's clean that up, make sure we only use slw_reinit() when HILE isn't supported. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: retain OPAL_UNSUPPORTED] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/cpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/cpu.c b/core/cpu.c
index 6c00bca..bcf84ad 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2017 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1216,8 +1216,8 @@ static int64_t opal_reinit_cpus(uint64_t flags)
flags &= ~(OPAL_REINIT_CPUS_HILE_BE | OPAL_REINIT_CPUS_HILE_LE);
}
- /* Any flags left ? */
- if (flags != 0 && proc_gen == proc_gen_p8)
+ /* Handle P8 DD1 SLW reinit */
+ if (flags != 0 && proc_gen == proc_gen_p8 && !hile_supported)
rc = slw_reinit(flags);
else if (flags != 0)
rc = OPAL_UNSUPPORTED;