[Skiboot] [PATCH 3/3] core/fast-reboot: disable fast reboot upon fundamental entry/exit/locking errors

Nicholas Piggin npiggin at gmail.com
Fri Mar 16 21:15:17 AEDT 2018


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 at gmail.com>
---
 core/lock.c | 1 +
 core/opal.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/core/lock.c b/core/lock.c
index 318f42d9..620d26b2 100644
--- a/core/lock.c
+++ b/core/lock.c
@@ -290,6 +290,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 38f9d724..e57f0a18 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 {
-- 
2.16.1



More information about the Skiboot mailing list