diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-04-30 09:19:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-30 13:15:39 -0400 |
commit | 35d824b28fc5544d1eb7c1e3db15a1740df8ec4b (patch) | |
tree | e9212c8ce16e41b193bce41436b3bbac22de43a4 /drivers/edac | |
parent | 12b1b321689cf92236fb216472744e39419fab30 (diff) |
edac, mce: Fix wrong mask and macro usage
Correct two mishaps which prevented reporting error type (CECC vs UECC)
and extended error description.
Cc: <stable@kernel.org> # 32.x, 33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/edac_mce_amd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index f5b6d9fe4def..97e64bcdbc06 100644 --- a/drivers/edac/edac_mce_amd.c +++ b/drivers/edac/edac_mce_amd.c | |||
@@ -294,7 +294,6 @@ wrong_ls_mce: | |||
294 | void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) | 294 | void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) |
295 | { | 295 | { |
296 | u32 ec = ERROR_CODE(regs->nbsl); | 296 | u32 ec = ERROR_CODE(regs->nbsl); |
297 | u32 xec = EXT_ERROR_CODE(regs->nbsl); | ||
298 | 297 | ||
299 | if (!handle_errors) | 298 | if (!handle_errors) |
300 | return; | 299 | return; |
@@ -324,7 +323,7 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) | |||
324 | pr_cont("\n"); | 323 | pr_cont("\n"); |
325 | } | 324 | } |
326 | 325 | ||
327 | pr_emerg("%s.\n", EXT_ERR_MSG(xec)); | 326 | pr_emerg("%s.\n", EXT_ERR_MSG(regs->nbsl)); |
328 | 327 | ||
329 | if (BUS_ERROR(ec) && nb_bus_decoder) | 328 | if (BUS_ERROR(ec) && nb_bus_decoder) |
330 | nb_bus_decoder(node_id, regs); | 329 | nb_bus_decoder(node_id, regs); |
@@ -374,7 +373,7 @@ static int amd_decode_mce(struct notifier_block *nb, unsigned long val, | |||
374 | ((m->status & MCI_STATUS_PCC) ? "yes" : "no")); | 373 | ((m->status & MCI_STATUS_PCC) ? "yes" : "no")); |
375 | 374 | ||
376 | /* do the two bits[14:13] together */ | 375 | /* do the two bits[14:13] together */ |
377 | ecc = m->status & (3ULL << 45); | 376 | ecc = (m->status >> 45) & 0x3; |
378 | if (ecc) | 377 | if (ecc) |
379 | pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U")); | 378 | pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U")); |
380 | 379 | ||