Skip to content

Commit addccbb

Browse files
Chen, Gongsuryasaimadhu
authored andcommitted
ACPI, APEI, GHES: Do not report only correctable errors with SCI
Currently SCI is employed to handle corrected errors - memory corrected errors, more specifically but in fact SCI still can be used to handle any errors, e.g. uncorrected or even fatal ones if enabled by the BIOS. Enable logging for those kinds of errors too. Signed-off-by: Chen, Gong <gong.chen@linux.intel.com> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/r/1385363701-12387-1-git-send-email-gong.chen@linux.intel.com [ Boris: massage commit message, rename function arg. ] Signed-off-by: Borislav Petkov <bp@suse.de>
1 parent 42139eb commit addccbb

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎arch/x86/kernel/cpu/mcheck/mce-apei.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,28 @@
3333
#include <linux/acpi.h>
3434
#include <linux/cper.h>
3535
#include <acpi/apei.h>
36+
#include <acpi/ghes.h>
3637
#include <asm/mce.h>
3738

3839
#include "mce-internal.h"
3940

40-
void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err)
41+
void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
4142
{
4243
struct mce m;
4344

44-
/* Only corrected MC is reported */
45-
if (!corrected || !(mem_err->validation_bits & CPER_MEM_VALID_PA))
45+
if (!(mem_err->validation_bits & CPER_MEM_VALID_PA))
4646
return;
4747

4848
mce_setup(&m);
4949
m.bank = 1;
50-
/* Fake a memory read corrected error with unknown channel */
50+
/* Fake a memory read error with unknown channel */
5151
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f;
52+
53+
if (severity >= GHES_SEV_RECOVERABLE)
54+
m.status |= MCI_STATUS_UC;
55+
if (severity >= GHES_SEV_PANIC)
56+
m.status |= MCI_STATUS_PCC;
57+
5258
m.addr = mem_err->physical_addr;
5359
mce_log(&m);
5460
mce_notify_irq();

‎drivers/acpi/apei/ghes.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,7 @@ static void ghes_do_proc(struct ghes *ghes,
453453
ghes_edac_report_mem_error(ghes, sev, mem_err);
454454

455455
#ifdef CONFIG_X86_MCE
456-
apei_mce_report_mem_error(sev == GHES_SEV_CORRECTED,
457-
mem_err);
456+
apei_mce_report_mem_error(sev, mem_err);
458457
#endif
459458
ghes_handle_memory_failure(gdata, sev);
460459
}

0 commit comments

Comments
 (0)