summaryrefslogtreecommitdiffstats
path: root/drivers/edac/pnd2_edac.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2020-02-14 23:27:17 +0100
committerBorislav Petkov <bp@suse.de>2020-04-14 15:59:26 +0200
commit23ba710a0864108910c7531dc4c73ef65eca5568 (patch)
treed5875a88dffb875229136fed490ad8367a108fdc /drivers/edac/pnd2_edac.c
parentx86/mce: Add a struct mce.kflags field (diff)
downloadlinux-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/edac/pnd2_edac.c')
-rw-r--r--drivers/edac/pnd2_edac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index bc47328eb485..1929a5dc8f94 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -1400,7 +1400,7 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
return NOTIFY_DONE;
mci = pnd2_mci;
- if (!mci)
+ if (!mci || (mce->kflags & MCE_HANDLED_CEC))
return NOTIFY_DONE;
/*
@@ -1429,7 +1429,8 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
pnd2_mce_output_error(mci, mce, &daddr);
/* Advice mcelog that the error were handled */
- return NOTIFY_STOP;
+ mce->kflags |= MCE_HANDLED_EDAC;
+ return NOTIFY_OK;
}
static struct notifier_block pnd2_mce_dec = {