summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce-apei.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-01-25 09:16:14 +0100
committerIngo Molnar <mingo@kernel.org>2014-01-25 09:16:14 +0100
commit2b45e0f9f34f718725e093f4e335600811d7105a (patch)
tree3c6d594539eb16fc955906da65b9fa7aacbc9145 /arch/x86/kernel/cpu/mcheck/mce-apei.c
parenta85eba8814631d0d48361c8b9a7ee0984e80c03c (diff)
parent15c81026204da897a05424c79263aea861a782cc (diff)
Merge branch 'linus' into x86/urgent
Merge in the x86 changes to apply a fix. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce-apei.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-apei.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c
index de8b60a53f6..a1aef953315 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-apei.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c
@@ -33,22 +33,28 @@
#include <linux/acpi.h>
#include <linux/cper.h>
#include <acpi/apei.h>
+#include <acpi/ghes.h>
#include <asm/mce.h>
#include "mce-internal.h"
-void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err)
+void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
{
struct mce m;
- /* Only corrected MC is reported */
- if (!corrected || !(mem_err->validation_bits & CPER_MEM_VALID_PA))
+ if (!(mem_err->validation_bits & CPER_MEM_VALID_PA))
return;
mce_setup(&m);
m.bank = 1;
- /* Fake a memory read corrected error with unknown channel */
+ /* Fake a memory read error with unknown channel */
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f;
+
+ if (severity >= GHES_SEV_RECOVERABLE)
+ m.status |= MCI_STATUS_UC;
+ if (severity >= GHES_SEV_PANIC)
+ m.status |= MCI_STATUS_PCC;
+
m.addr = mem_err->physical_addr;
mce_log(&m);
mce_notify_irq();