diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-07-07 16:08:41 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-07-12 13:07:21 +1000 |
commit | c0bdf1dac1dd97ed6cbf8008edbcac8dc6e23874 (patch) | |
tree | feeeda40bdd801b3647e708f843aeaa2108def0a /core/cpu.c | |
parent | 537b7a705df795d888852b2cb4fbe535b4d534f4 (diff) | |
download | skiboot-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/cpu.c')
-rw-r--r-- | core/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |