aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce-apei.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-01-29 09:07:00 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-01-29 09:07:00 -0800
commit4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125 (patch)
tree888b52771f540552a9dc85521d8dddf66eba9aeb /arch/x86/kernel/cpu/mcheck/mce-apei.c
parentx86, boot: Use __attribute__((used)) to ensure videocard structs are emitted (diff)
parentMerge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
downloadlinux-dev-4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125.tar.xz
linux-dev-4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125.zip
Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build
Bring in upstream merge of x86/kaslr for future patches. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
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 de8b60a53f69..a1aef9533154 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();