• Ganesh Goudar's avatar
    powerpc/mce: log the error for all unrecoverable errors · 2115732e
    Ganesh Goudar authored
    For all unrecoverable errors we are missing to log the
    error, Since machine_check_log_err() is not getting called
    for unrecoverable errors. machine_check_log_err() is called
    from deferred handler, To run deferred handlers we have to do
    irq work raise from the exception handler.
    
    For recoverable errors exception vector code takes care of
    running deferred handlers.
    
    For unrecoverable errors raise irq work in save_mce_event(),
    So that we log the error from MCE deferred handler.
    
    Log without this change
    
     MCE: CPU27: machine check (Severe)  Real address Load/Store (foreign/control memory) [Not recovered]
     MCE: CPU27: PID: 10580 Comm: inject-ra-err NIP: [0000000010000df4]
     MCE: CPU27: Initiator CPU
     MCE: CPU27: Unknown
    
    Log with this change
    
     MCE: CPU24: machine check (Severe)  Real address Load/Store (foreign/control memory) [Not recovered]
     MCE: CPU24: PID: 1589811 Comm: inject-ra-err NIP: [0000000010000e48]
     MCE: CPU24: Initiator CPU
     MCE: CPU24: Unknown
     RTAS: event: 5, Type: Platform Error (224), Severity: 3
    Signed-off-by: default avatarGanesh Goudar <ganeshgr@linux.ibm.com>
    Reviewed-by: default avatarMahesh Salgaonkar <mahesh@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20230201095933.129482-1-ganeshgr@linux.ibm.com
    2115732e
mce.c 19.6 KB