diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-03-09 14:38:48 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2010-03-22 11:33:31 -0400 |
commit | 5b89d2f9ace1970324facc68ca9b8fae19ce8096 (patch) | |
tree | a692a753f4a836e651567ebf40602e0bcaf9d72b /drivers/edac/edac_mce_amd.c | |
parent | 220bf991b0366cc50a94feede3d7341fa5710ee4 (diff) |
edac, mce: Filter out invalid values
Print the CPU associated with the error only when the field is valid.
Cc: <stable@kernel.org> # .32.x .33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/edac_mce_amd.c')
-rw-r--r-- | drivers/edac/edac_mce_amd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index 8fc91a019620..f5b6d9fe4def 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) | |||
316 | if (regs->nbsh & K8_NBSH_ERR_CPU_VAL) | 316 | if (regs->nbsh & K8_NBSH_ERR_CPU_VAL) |
317 | pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf)); | 317 | pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf)); |
318 | } else { | 318 | } else { |
319 | pr_cont(", core: %d\n", fls((regs->nbsh & 0xf) - 1)); | 319 | u8 assoc_cpus = regs->nbsh & 0xf; |
320 | |||
321 | if (assoc_cpus > 0) | ||
322 | pr_cont(", core: %d", fls(assoc_cpus) - 1); | ||
323 | |||
324 | pr_cont("\n"); | ||
320 | } | 325 | } |
321 | 326 | ||
322 | pr_emerg("%s.\n", EXT_ERR_MSG(xec)); | 327 | pr_emerg("%s.\n", EXT_ERR_MSG(xec)); |