[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490041614-90057-2-git-send-email-Yazen.Ghannam@amd.com>
Date: Mon, 20 Mar 2017 15:26:51 -0500
From: Yazen Ghannam <Yazen.Ghannam@....com>
To: <linux-edac@...r.kernel.org>
CC: Yazen Ghannam <Yazen.Ghannam@....com>,
Tony Luck <tony.luck@...el.com>, Borislav Petkov <bp@...e.de>,
<x86@...nel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2 1/4] EDAC,mce_amd: Find node ID on SMCA systems using generic methods
From: Yazen Ghannam <yazen.ghannam@....com>
We should move away from using AMD-specific amd_get_nb_id() to find a node
ID and move toward using generic Linux methods. We can use cpu_to_node()
since NUMA should be working as expected on newly released Fam17h systems.
Replace call to amd_get_nb_id() and related shifting by a call to
cpu_to_node() which works as expected.
Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
---
Link: http://lkml.kernel.org/r/1486760120-60944-1-git-send-email-Yazen.Ghannam@amd.com
v1->v2:
- Just use cpu_to_node() instead of trying to make amd_get_nb_id() work.
drivers/edac/mce_amd.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index ba35b7e..dbccf40 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -878,12 +878,8 @@ static void decode_smca_errors(struct mce *m)
pr_cont("%s.\n", smca_mce_descs[bank_type].descs[xec]);
}
- /*
- * amd_get_nb_id() returns the last level cache id.
- * The last level cache on Fam17h is 1 level below the node.
- */
if (bank_type == SMCA_UMC && xec == 0 && decode_dram_ecc)
- decode_dram_ecc(amd_get_nb_id(m->extcpu) >> 1, m);
+ decode_dram_ecc(cpu_to_node(m->extcpu), m);
}
static inline void amd_decode_err_code(u16 ec)
--
2.7.4
Powered by blists - more mailing lists