Skip to content

Commit

Permalink
EDAC, amd64: Don't treat ECC disabled as failure
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: linux-edac <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
  • Loading branch information
yghannam authored and suryasaimadhu committed Jan 28, 2017
1 parent d7fc9d7 commit 4688c9b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4688c9b

Please sign in to comment.