aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-22 09:58:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-22 09:58:04 -0700
commite91924158d89086357e46887c23d714cfb4e05ea (patch)
tree886e45869401dd93ff2dc656ac95060f70ab6b9e /drivers
parentc3824d21eb653fe7017476724257ccaa8bf3d9e1 (diff)
parent5b89d2f9ace1970324facc68ca9b8fae19ce8096 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: edac, mce: Filter out invalid values
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/edac_mce_amd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c
index 8fc91a01962..f5b6d9fe4de 100644
--- a/drivers/edac/edac_mce_amd.c
+++ b/drivers/edac/edac_mce_amd.c
@@ -316,7 +316,12 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors)
if (regs->nbsh & K8_NBSH_ERR_CPU_VAL)
pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf));
} else {
- pr_cont(", core: %d\n", fls((regs->nbsh & 0xf) - 1));
+ u8 assoc_cpus = regs->nbsh & 0xf;
+
+ if (assoc_cpus > 0)
+ pr_cont(", core: %d", fls(assoc_cpus) - 1);
+
+ pr_cont("\n");
}
pr_emerg("%s.\n", EXT_ERR_MSG(xec));