EDAC, i7core/sb_edac/skx_edac: Fix uncorrected error counting
Subsystems (4)
Luck, Tony
maintainerWe pick up the count of errors from bits 52:38 of the machine check bank status register. But this is the count of *corrected* errors. If we are logging an uncorrected error, the h/w set this field to 0. Which means that when we call into edac_mc_handle_error() the EDAC core will carefully add zero to the appropriate uncorrected error counts.
Signed-off-by Tony Luck <[email protected]>
---
So I was digging around in /sys/devices/system/edac/mc/mc*/* and noticed the the "ue_count" files all read "0" even after injecting and recovering from some 2-bit error.
drivers/edac/i7core_edac.c | 1 + drivers/edac/sb_edac.c | 1 + drivers/edac/skx_edac.c | 1 + 3 files changed, 3 insertions(+)
drivers/edac/i7core_edac.c +1 -0
@@ -1711,6 +1711,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,u32 errnum =find_first_bit (&error,32 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) tp_event =HW_EVENT_ERR_FATAL ;else
drivers/edac/sb_edac.c +1 -0
@@ -2888,6 +2888,7 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci, recoverable =GET_BITFIELD (m->status,56 ,56 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) { type ="FATAL" ; tp_event =HW_EVENT_ERR_FATAL ;
drivers/edac/skx_edac.c +1 -0
@@ -959,6 +959,7 @@ static void skx_mce_output_error(struct mem_ctl_info *mci, recoverable =GET_BITFIELD (m->status,56 ,56 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) { type ="FATAL" ; tp_event =HW_EVENT_ERR_FATAL ;