diff options
author | Tony Luck <tony.luck@intel.com> | 2020-02-14 23:27:17 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-04-14 15:59:26 +0200 |
commit | 23ba710a0864108910c7531dc4c73ef65eca5568 (patch) | |
tree | d5875a88dffb875229136fed490ad8367a108fdc /drivers/acpi | |
parent | x86/mce: Add a struct mce.kflags field (diff) | |
download | linux-23ba710a0864108910c7531dc4c73ef65eca5568.tar.xz linux-23ba710a0864108910c7531dc4c73ef65eca5568.zip |
x86/mce: Fix all mce notifiers to update the mce->kflags bitmask
If the handler took any action to log or deal with the error, set a bit
in mce->kflags so that the default handler on the end of the machine
check chain can see what has been done.
Get rid of NOTIFY_STOP returns. Make the EDAC and dev-mcelog handlers
skip over errors already processed by CEC.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20200214222720.13168-5-tony.luck@intel.com
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_extlog.c | 5 | ||||
-rw-r--r-- | drivers/acpi/nfit/mce.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c index 8596a106a933..9cc3c1f92db5 100644 --- a/drivers/acpi/acpi_extlog.c +++ b/drivers/acpi/acpi_extlog.c @@ -146,7 +146,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, static u32 err_seq; estatus = extlog_elog_entry_check(cpu, bank); - if (estatus == NULL) + if (estatus == NULL || (mce->kflags & MCE_HANDLED_CEC)) return NOTIFY_DONE; memcpy(elog_buf, (void *)estatus, ELOG_ENTRY_LEN); @@ -176,7 +176,8 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, } out: - return NOTIFY_STOP; + mce->kflags |= MCE_HANDLED_EXTLOG; + return NOTIFY_OK; } static bool __init extlog_get_l1addr(void) diff --git a/drivers/acpi/nfit/mce.c b/drivers/acpi/nfit/mce.c index f0ae48515b48..ee8d9973f60b 100644 --- a/drivers/acpi/nfit/mce.c +++ b/drivers/acpi/nfit/mce.c @@ -76,6 +76,7 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val, */ acpi_nfit_ars_rescan(acpi_desc, 0); } + mce->kflags |= MCE_HANDLED_NFIT; break; } |