diff options
author | Yazen Ghannam <yazen.ghannam@amd.com> | 2017-12-18 06:37:14 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-12-18 06:58:29 -0500 |
commit | 179eb850ac57c06edaed67fc744ba9d902172f96 (patch) | |
tree | b24963393ffad4bb9cc34001f020bd63f889d6bc | |
parent | c6708d50f166bea2d763c96485d31fdbc50204f1 (diff) |
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 <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171212165143.27475-1-Yazen.Ghannam@amd.com
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 321c7a80be66..1b2c11473376 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -528,6 +528,17 @@ bool mce_is_memory_error(struct mce *m) | |||
528 | } | 528 | } |
529 | EXPORT_SYMBOL_GPL(mce_is_memory_error); | 529 | EXPORT_SYMBOL_GPL(mce_is_memory_error); |
530 | 530 | ||
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 | |||
531 | static bool cec_add_mce(struct mce *m) | 542 | static bool cec_add_mce(struct mce *m) |
532 | { | 543 | { |
533 | if (!m) | 544 | if (!m) |
@@ -535,7 +546,7 @@ static bool cec_add_mce(struct mce *m) | |||
535 | 546 | ||
536 | /* We eat only correctable DRAM errors with usable addresses. */ | 547 | /* We eat only correctable DRAM errors with usable addresses. */ |
537 | if (mce_is_memory_error(m) && | 548 | if (mce_is_memory_error(m) && |
538 | !(m->status & MCI_STATUS_UC) && | 549 | mce_is_correctable(m) && |
539 | mce_usable_address(m)) | 550 | mce_usable_address(m)) |
540 | if (!cec_add_elem(m->addr >> PAGE_SHIFT)) | 551 | if (!cec_add_elem(m->addr >> PAGE_SHIFT)) |
541 | return true; | 552 | return true; |