aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-03-16 20:15:17 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-22 22:53:01 -0700
commitc09197f74e2fe42034ecdc862cbea06f71767947 (patch)
treed42df1d4d8f14fed8f2ffdce45bf44b3442f053f
parent1312e82d84e3b73dccfa1fe7021e8869cae28440 (diff)
downloadskiboot-c09197f74e2fe42034ecdc862cbea06f71767947.zip
skiboot-c09197f74e2fe42034ecdc862cbea06f71767947.tar.gz
skiboot-c09197f74e2fe42034ecdc862cbea06f71767947.tar.bz2
core/fast-reboot: disable fast reboot upon fundamental entry/exit/locking errors
This disables fast reboot in several more cases where serious errors like lock corruption or call re-entrancy are detected. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 1f53f9fa766f0e8ccf4ce59821c541dba268340b) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/lock.c1
-rw-r--r--core/opal.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/core/lock.c b/core/lock.c
index edfe1c7..af75c36 100644
--- a/core/lock.c
+++ b/core/lock.c
@@ -176,6 +176,7 @@ void drop_my_locks(bool warn)
{
struct lock *l;
+ disable_fast_reboot("Lock corruption");
while((l = list_pop(&this_cpu()->locks_held, struct lock, list)) != NULL) {
if (warn)
prlog(PR_ERR, " %s\n", l->owner);
diff --git a/core/opal.c b/core/opal.c
index 0d06e31..2883045 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -143,6 +143,7 @@ int64_t opal_entry_check(struct stack_frame *eframe)
return opal_bad_token(token);
if (!opal_quiesce_state && cpu->in_opal_call) {
+ disable_fast_reboot("Kernel re-entered OPAL");
switch (token) {
case OPAL_CONSOLE_READ:
case OPAL_CONSOLE_WRITE:
@@ -192,6 +193,7 @@ int64_t opal_exit_check(int64_t retval, struct stack_frame *eframe)
uint64_t token = eframe->gpr[0];
if (!cpu->in_opal_call) {
+ disable_fast_reboot("Un-accounted firmware entry");
printf("CPU UN-ACCOUNTED FIRMWARE ENTRY! PIR=%04lx cpu @%p -> pir=%04x token=%llu retval=%lld\n",
mfspr(SPR_PIR), cpu, cpu->pir, token, retval);
} else {