[Skiboot] [PATCH 4/9] cpu: Better handle unknown flags in opal_reinit_cpus()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Jul 8 07:08:41 AEST 2017
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 and don't return OPAL_UNSUPPORTED at all.
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
core/cpu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/core/cpu.c b/core/cpu.c
index 6c00bca..9a41c88 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1216,11 +1216,9 @@ 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;
/* And undo the above */
lock(&reinit_lock);
--
2.9.4
More information about the Skiboot
mailing list