Commit f8a25db4 authored by Russell Currey's avatar Russell Currey Committed by Michael Ellerman

powerpc/powernv: Use the "unknown" checkstop type as a fallback

The HMI code knows about three types of errors: CORE, NX and UNKNOWN.
If OPAL were to add a new type, it would not be handled at all since
there is no fallback case.  Instead of explicitly checking for UNKNOWN,
treat any checkstop type without a handler as unknown.
Signed-off-by: default avatarRussell Currey <ruscur@russell.cc>
Reviewed-by: default avatarDaniel Axtens <dja@axtens.net>
Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d88e397f
...@@ -150,15 +150,17 @@ static void print_nx_checkstop_reason(const char *level, ...@@ -150,15 +150,17 @@ static void print_nx_checkstop_reason(const char *level,
static void print_checkstop_reason(const char *level, static void print_checkstop_reason(const char *level,
struct OpalHMIEvent *hmi_evt) struct OpalHMIEvent *hmi_evt)
{ {
switch (hmi_evt->u.xstop_error.xstop_type) { uint8_t type = hmi_evt->u.xstop_error.xstop_type;
switch (type) {
case CHECKSTOP_TYPE_CORE: case CHECKSTOP_TYPE_CORE:
print_core_checkstop_reason(level, hmi_evt); print_core_checkstop_reason(level, hmi_evt);
break; break;
case CHECKSTOP_TYPE_NX: case CHECKSTOP_TYPE_NX:
print_nx_checkstop_reason(level, hmi_evt); print_nx_checkstop_reason(level, hmi_evt);
break; break;
case CHECKSTOP_TYPE_UNKNOWN: default:
printk("%s Unknown Malfunction Alert.\n", level); printk("%s Unknown Malfunction Alert of type %d\n",
level, type);
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment