summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYazen Ghannam <Yazen.Ghannam@amd.com>2017-01-27 11:24:22 -0600
committerBorislav Petkov <bp@suse.de>2017-01-28 14:38:49 +0100
commit4688c9b42dd2040673a1c2208a1008822b07ee4a (patch)
tree655d28980e8b450f88a1512b69bfa0237bd6fb0a
parentd7fc9d77acb8651e5fcb77df71dfd11fcf1f08ba (diff)
downloadlinux-4688c9b42dd2040673a1c2208a1008822b07ee4a.tar.gz
linux-4688c9b42dd2040673a1c2208a1008822b07ee4a.tar.bz2
linux-4688c9b42dd2040673a1c2208a1008822b07ee4a.zip
EDAC, amd64: Don't treat ECC disabled as failure
Having ECC disabled on a node doesn't necessarily mean that it's disabled for the entire system. So let's return a non-failing code when ECC is disabled on a node. This way we can skip initialization for the node but still continue with the remaining nodes. After probing all instances, make sure we have at least one MC device allocated. This issue is seen and fix tested on Fam15h and Fam17h MCM systems. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1485537863-2707-8-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov <bp@suse.de>
-rw-r--r--drivers/edac/amd64_edac.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 27246aa8128d..565dc52dbb6f 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3336,7 +3336,7 @@ static int probe_one_instance(unsigned int nid)
ecc_stngs[nid] = s;
if (!ecc_enabled(F3, nid)) {
- ret = -ENODEV;
+ ret = 0;
if (!ecc_enable_override)
goto err_enable;
@@ -3465,6 +3465,11 @@ static int __init amd64_edac_init(void)
}
}
+ if (!edac_has_mcs()) {
+ err = -ENODEV;
+ goto err_pci;
+ }
+
/* register stuff with EDAC MCE */
if (report_gart_errors)
amd_report_gart_errors(true);