powerpc/rtasd: Improve unknown error logging
PATCH 1/1 powerpc/rtasd: Improve unknown error logging
Currently when we get an unknown RTAS event it prints the type as "Unknown" and no other useful information. Add the raw type code to the log message so that we have something to work off.
Signed-off-by Oliver O'Halloran <[email protected]>
--- arch/powerpc/kernel/rtasd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kernel/rtasd.c +4 -2
@@ -150,8 +150,10 @@ static void printk_log_rtas(char *buf, int len) }else {struct rtas_error_log *errlog = (struct rtas_error_log *)buf; -printk (RTAS_DEBUG "event: %d, Type: %s, Severity: %d\n" , - error_log_cnt,rtas_event_type (rtas_error_type (errlog)), +printk (RTAS_DEBUG "event: %d, Type: %s (%d), Severity: %d\n" , + error_log_cnt, +rtas_event_type (rtas_error_type (errlog)), +rtas_error_type (errlog),rtas_error_severity (errlog)); } }
Signature · 1 line
2.9.5
Quoted 3 lines · Oliver O'Halloran
Currently when we get an unknown RTAS event it prints the type as "Unknown" and no other useful information. Add the raw type code to the log message so that we have something to work off.
Yeah. Useful one.
Reviewed-by Vasant Hegde <[email protected]>
-Vasant
Quoted 24 lines
Signed-off-by Oliver O'Halloran <[email protected]>--- arch/powerpc/kernel/rtasd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)arch/powerpc/kernel/rtasd.c +4
-2@@ -150,8 +150,10 @@ static void printk_log_rtas(char *buf, int len) }else {struct rtas_error_log *errlog = (struct rtas_error_log *)buf; -printk (RTAS_DEBUG "event: %d, Type: %s, Severity: %d\n" , - error_log_cnt,rtas_event_type (rtas_error_type (errlog)), +printk (RTAS_DEBUG "event: %d, Type: %s (%d), Severity: %d\n" , + error_log_cnt, +rtas_event_type (rtas_error_type (errlog)), +rtas_error_type (errlog),rtas_error_severity (errlog)); } }
Michael Ellerman
AppliedQuoted 6 lines · Oliver O'Halloran
Currently when we get an unknown RTAS event it prints the type as "Unknown" and no other useful information. Add the raw type code to the log message so that we have something to work off.
Signed-off-by Oliver O'Halloran <[email protected]>Reviewed-by Vasant Hegde <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/b27e5f939b6d50e1b83e9febfee1c3
cheers