diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-11-25 09:40:27 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-01-07 05:54:26 -0500 |
commit | 6d5db4668796d903dc3bad2852c82073509c37d2 (patch) | |
tree | a6520e67f93ececcb71f6469fde28e63cb3bb52c /drivers/edac | |
parent | 50adbbd8a8e572ad2533eace228c841ec84028a3 (diff) |
EDAC, MCE: Fix NB error formatting
Minor formatting fixup since the information which core was associated
with the MCE is not always valid.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/mce_amd.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index 61e0e87d1841..f6cf73d93359 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c | |||
@@ -597,24 +597,27 @@ void amd_decode_nb_mce(int node_id, struct mce *m, u32 nbcfg) | |||
597 | u16 ec = EC(m->status); | 597 | u16 ec = EC(m->status); |
598 | u8 xec = XEC(m->status, 0x1f); | 598 | u8 xec = XEC(m->status, 0x1f); |
599 | u32 nbsh = (u32)(m->status >> 32); | 599 | u32 nbsh = (u32)(m->status >> 32); |
600 | int core = -1; | ||
600 | 601 | ||
601 | pr_emerg(HW_ERR "Northbridge Error, node %d: ", node_id); | 602 | pr_emerg(HW_ERR "Northbridge Error (node %d", node_id); |
602 | 603 | ||
603 | /* | 604 | /* F10h, revD can disable ErrCpu[3:0] through ErrCpuVal */ |
604 | * F10h, revD can disable ErrCpu[3:0] so check that first and also the | ||
605 | * value encoding has changed so interpret those differently | ||
606 | */ | ||
607 | if ((boot_cpu_data.x86 == 0x10) && | 605 | if ((boot_cpu_data.x86 == 0x10) && |
608 | (boot_cpu_data.x86_model > 7)) { | 606 | (boot_cpu_data.x86_model > 7)) { |
609 | if (nbsh & K8_NBSH_ERR_CPU_VAL) | 607 | if (nbsh & K8_NBSH_ERR_CPU_VAL) |
610 | pr_cont(", core: %u", (u8)(nbsh & nb_err_cpumask)); | 608 | core = nbsh & nb_err_cpumask; |
611 | } else { | 609 | } else { |
612 | u8 assoc_cpus = nbsh & nb_err_cpumask; | 610 | u8 assoc_cpus = nbsh & nb_err_cpumask; |
613 | 611 | ||
614 | if (assoc_cpus > 0) | 612 | if (assoc_cpus > 0) |
615 | pr_cont(", core: %d", fls(assoc_cpus) - 1); | 613 | core = fls(assoc_cpus) - 1; |
616 | } | 614 | } |
617 | 615 | ||
616 | if (core >= 0) | ||
617 | pr_cont(", core %d): ", core); | ||
618 | else | ||
619 | pr_cont("): "); | ||
620 | |||
618 | switch (xec) { | 621 | switch (xec) { |
619 | case 0x2: | 622 | case 0x2: |
620 | pr_cont("Sync error (sync packets on HT link detected).\n"); | 623 | pr_cont("Sync error (sync packets on HT link detected).\n"); |