Skip to content

Commit 179eb85

Browse files
yghannamKAGA-KOKO
authored andcommitted
x86/MCE: Make correctable error detection look at the Deferred bit
AMD systems may log Deferred errors. These are errors that are uncorrected but which do not need immediate action. The MCA_STATUS[UC] bit may not be set for Deferred errors. Flag the error as not correctable when MCA_STATUS[Deferred] is set and do not feed it into the Correctable Errors Collector. [ bp: Massage commit message. ] Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
1 parent c6708d5 commit 179eb85

File tree

1 file changed

+12
-1
lines changed
  • arch/x86/kernel/cpu/mcheck

1 file changed

+12
-1
lines changed

arch/x86/kernel/cpu/mcheck/mce.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,14 +528,25 @@ bool mce_is_memory_error(struct mce *m)
528528
}
529529
EXPORT_SYMBOL_GPL(mce_is_memory_error);
530530

531+
static bool mce_is_correctable(struct mce *m)
532+
{
533+
if (m->cpuvendor == X86_VENDOR_AMD && m->status & MCI_STATUS_DEFERRED)
534+
return false;
535+
536+
if (m->status & MCI_STATUS_UC)
537+
return false;
538+
539+
return true;
540+
}
541+
531542
static bool cec_add_mce(struct mce *m)
532543
{
533544
if (!m)
534545
return false;
535546

536547
/* We eat only correctable DRAM errors with usable addresses. */
537548
if (mce_is_memory_error(m) &&
538-
!(m->status & MCI_STATUS_UC) &&
549+
mce_is_correctable(m) &&
539550
mce_usable_address(m))
540551
if (!cec_add_elem(m->addr >> PAGE_SHIFT))
541552
return true;

0 commit comments

Comments
 (0)