[Skiboot] [PATCH 1/4] core/fast-reboot: print the fast reboot disable reason
Nicholas Piggin
npiggin at gmail.com
Tue Sep 18 15:49:50 AEST 2018
Once things start to go wrong, disable_fast_reboot can be called a
number of times, so make the first reason sticky, and also print it
to the console at disable time. This helps with making sense of
fast reboot disables.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
core/fast-reboot.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 56d6b3b4..e127b9bd 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -69,6 +69,10 @@ static const char *fast_reboot_disabled = NULL;
void disable_fast_reboot(const char *reason)
{
+ if (fast_reboot_disabled)
+ return;
+
+ prlog(PR_NOTICE, "RESET: Fast reboot disabled: %s\n", reason);
fast_reboot_disabled = reason;
}
@@ -81,8 +85,7 @@ void disable_fast_reboot(const char *reason)
static bool fast_reboot_sanity_check(void)
{
if (!mem_check_all()) {
- prlog(PR_NOTICE, "REST: Fast reboot failed due to inconsistent "
- "firmware data\n");
+ disable_fast_reboot("Inconsistent firmware data");
return false;
}
@@ -110,13 +113,12 @@ void fast_reboot(void)
* Ensure all other CPUs have left OPAL calls.
*/
if (!opal_quiesce(QUIESCE_HOLD, -1)) {
- prlog(PR_NOTICE, "RESET: Fast reboot disabled because OPAL "
- "quiesce timed out\n");
+ disable_fast_reboot("OPAL quiesce timeout");
return;
}
if (fast_reboot_disabled) {
- prlog(PR_DEBUG, "RESET: Fast reboot disabled because %s\n",
+ prlog(PR_NOTICE, "RESET: Fast reboot disabled: %s\n",
fast_reboot_disabled);
opal_quiesce(QUIESCE_RESUME, -1);
return;
--
2.18.0
More information about the Skiboot
mailing list