Skip to content

Commit bcd781f

Browse files
author
Borislav Petkov
committed
amd64_edac: Cleanup NBSH cruft
Remove reporting of errors with UC bit set - this is done by the MCE decoding code anyway and this driver deals with DRAM ECC errors only. UC (NB uncorrectable error) doesn't necessarily mean it is a DRAM error. Remove unused macros while at it. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
1 parent a97fa68 commit bcd781f

3 files changed

Lines changed: 8 additions & 27 deletions

File tree

‎drivers/edac/amd64_edac.c‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,7 @@ static void amd64_handle_ce(struct mem_ctl_info *mci,
17481748
u64 sys_addr;
17491749

17501750
/* Ensure that the Error Address is VALID */
1751-
if (!(info->nbsh & K8_NBSH_VALID_ERROR_ADDR)) {
1751+
if (!(info->nbsh & NBSH_VALID_ERROR_ADDR)) {
17521752
amd64_mc_err(mci, "HW has no ERROR_ADDRESS available\n");
17531753
edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR);
17541754
return;
@@ -1773,7 +1773,7 @@ static void amd64_handle_ue(struct mem_ctl_info *mci,
17731773

17741774
log_mci = mci;
17751775

1776-
if (!(info->nbsh & K8_NBSH_VALID_ERROR_ADDR)) {
1776+
if (!(info->nbsh & NBSH_VALID_ERROR_ADDR)) {
17771777
amd64_mc_err(mci, "HW has no ERROR_ADDRESS available\n");
17781778
edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR);
17791779
return;
@@ -1839,17 +1839,6 @@ void amd64_decode_bus_error(int node_id, struct mce *m, u32 nbcfg)
18391839
regs.nbcfg = nbcfg;
18401840

18411841
__amd64_decode_bus_error(mci, &regs);
1842-
1843-
/*
1844-
* Check the UE bit of the NB status high register, if set generate some
1845-
* logs. If NOT a GART error, then process the event as a NO-INFO event.
1846-
* If it was a GART error, skip that process.
1847-
*
1848-
* FIXME: this should go somewhere else, if at all.
1849-
*/
1850-
if (regs.nbsh & K8_NBSH_UC_ERR && !report_gart_errors)
1851-
edac_mc_handle_ue_no_info(mci, "UE bit is set");
1852-
18531842
}
18541843

18551844
/*

‎drivers/edac/mce_amd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ void amd_decode_nb_mce(int node_id, struct mce *m, u32 nbcfg)
604604
/* F10h, revD can disable ErrCpu[3:0] through ErrCpuVal */
605605
if ((boot_cpu_data.x86 == 0x10) &&
606606
(boot_cpu_data.x86_model > 7)) {
607-
if (nbsh & K8_NBSH_ERR_CPU_VAL)
607+
if (nbsh & NBSH_ERR_CPU_VAL)
608608
core = nbsh & nb_err_cpumask;
609609
} else {
610610
u8 assoc_cpus = nbsh & nb_err_cpumask;

‎drivers/edac/mce_amd.h‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,11 @@
3131
#define R4(x) (((x) >> 4) & 0xf)
3232
#define R4_MSG(x) ((R4(x) < 9) ? rrrr_msgs[R4(x)] : "Wrong R4!")
3333

34-
#define K8_NBSH 0x4C
35-
36-
#define K8_NBSH_VALID_BIT BIT(31)
37-
#define K8_NBSH_OVERFLOW BIT(30)
38-
#define K8_NBSH_UC_ERR BIT(29)
39-
#define K8_NBSH_ERR_EN BIT(28)
40-
#define K8_NBSH_MISCV BIT(27)
41-
#define K8_NBSH_VALID_ERROR_ADDR BIT(26)
42-
#define K8_NBSH_PCC BIT(25)
43-
#define K8_NBSH_ERR_CPU_VAL BIT(24)
44-
#define K8_NBSH_CECC BIT(14)
45-
#define K8_NBSH_UECC BIT(13)
46-
#define K8_NBSH_ERR_SCRUBER BIT(8)
34+
/*
35+
* F3x4C bits (MCi_STATUS' high half)
36+
*/
37+
#define NBSH_VALID_ERROR_ADDR BIT(26)
38+
#define NBSH_ERR_CPU_VAL BIT(24)
4739

4840
enum tt_ids {
4941
TT_INSTR = 0,

0 commit comments

Comments
 (0)