From 38a8daca5ab5eee8a6b94efe3bda2873ac46c130 Mon Sep 17 00:00:00 2001 From: Wenhui Fan Date: Mon, 28 Oct 2024 20:35:12 +0800 Subject: [PATCH] EDAC/amd64: Don't use the ATL for Hygon model 4h~fh and 10h processors hygon inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB0CWI CVE: NA --------------------------- Translate the normal address to system address is different for Hygon model 4h~fh and 10h processors. The umc instance id is also differnt for Hygon model 6h processor. Fixes: ef9aad1ad603 ("EDAC/amd64: Use new AMD Address Translation Library") Signed-off-by: Wenhui Fan --- drivers/edac/amd64_edac.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index d026fa7a5bd2..0329d5fe43a7 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3150,8 +3150,12 @@ static void decode_umc_error(int node_id, struct mce *m) pvt->ops->get_err_info(m, &err); - if (hygon_f18h_m4h() && boot_cpu_data.x86_model == 0x6) { - umc = err.channel << 1; + if (hygon_f18h_m4h() || boot_cpu_data.x86_model == 0x10) { + if (boot_cpu_data.x86_model == 0x6) + umc = err.channel << 1; + else + umc = err.channel; + if (umc_normaddr_to_sysaddr(m->addr, pvt->mc_node_id, umc, &sys_addr)) { err.err_code = ERR_NORM_ADDR; goto log_error; -- Gitee