lkml.org 
[lkml]   [2017]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/4] EDAC,mce_amd: Find node ID on SMCA systems using generic methods
Date
From: Yazen Ghannam <yazen.ghannam@amd.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@amd.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
\
 
 \ /
  Last update: 2017-03-20 21:30    [W:0.060 / U:14.540 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site