diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-04-30 09:19:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-12 18:02:44 -0400 |
commit | 73f0c8de569332547c42046b5cf179483be99bef (patch) | |
tree | 4b18cd98844e330d875656692cee104f81f9a214 /drivers | |
parent | 7525b22412ed31cdd781f8e4a9fbf28decd2994a (diff) |
edac, mce: Fix wrong mask and macro usage
commit 35d824b28fc5544d1eb7c1e3db15a1740df8ec4b upstream.
Correct two mishaps which prevented reporting error type (CECC vs UECC)
and extended error description.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-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 | ||