[PATCH] EDAC/amd64: Use the UMC bank's AMD Node ID on Zen6

From: Yazen Ghannam

Date: Mon Oct 19 2026 - 16:44:24 EST


decode_dram_ecc() is given the AMD Node ID of the CPU that reported the
error. This is the node of the CPU managing the MCA bank, not the node
of the bank itself.

On Zen6 systems, a UMC MCA bank may be managed by a CPU on a different
AMD Node. The error is then decoded and logged against the wrong memory
controller.

MCA_IPID[InstanceIdHi] holds the global AMD Node ID of the bank. Use it
directly on Zen6 systems.

Fixes: 6fffa38c4c44 ("EDAC/amd64: Add support for AMD family 1Ah-based newer models")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
drivers/edac/amd64_edac.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 0c0d11c72925..7adb79c658af 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1044,6 +1044,10 @@ static int fixup_node_id(int node_id, struct mce *m)
/* MCA_IPID[InstanceIdHi] give the AMD Node ID for the bank. */
u8 nid = (m->ipid >> 44) & 0xF;

+ /* The managing CPU may be on a different AMD Node than the bank. */
+ if (cpu_feature_enabled(X86_FEATURE_ZEN6))
+ return nid;
+
if (smca_get_bank_type(m->extcpu, m->bank) != SMCA_UMC_V2)
return node_id;


base-commit: 0489f2176209b710890096699c4b869f1db91df4
--
2.55.0