[PATCH 3/4] EDAC/amd64: Set zn_regs_v2 flag for all AMD Family 1Ah-based SOCs

Avadhut Naik
2025-10-13T17:37:26Z

The zn_regs_v2 flag should be set for all AMD Family 1Ah-based SOCs.

Set the flag once for all 1Ah-based SOCs and avoid repetetive assignment.

Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
---
drivers/edac/amd64_edac.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 2391f3469961..832f9675e7b0 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3779,6 +3779,8 @@ static int per_family_init(struct amd64_pvt *pvt)
else
pvt->ops = &dct_ops;

+ pvt->flags.zn_regs_v2 = (pvt->fam >= 0x1A) ? 1 : 0;
+
switch (pvt->fam) {
case 0xf:
tmp_name = (pvt->ext_model >= K8_REV_F) ?
@@ -3887,20 +3889,14 @@ static int per_family_init(struct amd64_pvt *pvt)
switch (pvt->model) {
case 0x00 ... 0x1f:
pvt->max_mcs = 12;
- pvt->flags.zn_regs_v2 = 1;
- break;
- case 0x40 ... 0x4f:
- pvt->flags.zn_regs_v2 = 1;
break;
case 0x50 ... 0x57:
case 0xc0 ... 0xc7:
pvt->max_mcs = 16;
- pvt->flags.zn_regs_v2 = 1;
break;
case 0x90 ... 0x9f:
case 0xa0 ... 0xaf:
pvt->max_mcs = 8;
- pvt->flags.zn_regs_v2 = 1;
break;
}
break;
--
2.43.0