Skip to contentSkip to conversation

EDAC/amd64: Consolidate Family 1Ah setup and add support for models 0x88 ... 0x8f

PATCH Applied Vishal Badole 3 participants 6 messages Oct 14 – Nov 5

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover EDAC/amd64: Consolidate Family 1Ah setup and add support for models 0x88 ... 0x8f

This series cleans up the Family 1Ah model handling in amd64_edac and then adds support for the 0x88 ... 0x8f models.

Patch 1 consolidates the Family 1Ah setup: select the v2 UMC register layout once for the whole family instead of per model, and reject models that are not known to work.

Patch 2 adds the 0x88 ... 0x8f models, which use the default Family 1Ah settings (2 UMCs, v2 register layout), so the driver can decode and report memory errors on them.

Vishal Badole (2):
EDAC/amd64: Consolidate Family 1Ah model setup EDAC/amd64: Add support for Family 1Ah models 0x88 ... 0x8f

 drivers/edac/amd64_edac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 EDAC/amd64: Consolidate Family 1Ah model setup

Every Family 1Ah model uses the v2 UMC register layout, and the driver must select it to decode memory errors correctly.

So far each model had to select this itself. That is easy to forget when a new model is added, and a single missed flag quietly breaks error decoding. The driver also had no check for unknown models, so it would load on parts that were never tested and look supported when they are not.

Handle the layout once for the whole family so no model can miss it, and do not load on models that are not known to work.

---
 drivers/edac/amd64_edac.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/edac/amd64_edac.c +4 -4
index 0c0d11c72925..7ba347bfd9a0 100644
@@ -3887,24 +3887,24 @@ static int per_family_init(struct amd64_pvt *pvt)
 		break;
 
 	case 0x1A:
+		pvt->flags.zn_regs_v2   = 1;
+
 		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;
+		default:
+			return -ENODEV;
 		}
 		break;
 
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] EDAC/amd64: Consolidate Family 1Ah model setup

Quoted 9 lines · Vishal Badole

Every Family 1Ah model uses the v2 UMC register layout, and the driver must select it to decode memory errors correctly.

So far each model had to select this itself. That is easy to forget when a new model is added, and a single missed flag quietly breaks error decoding. The driver also had no check for unknown models, so it would load on parts that were never tested and look supported when they are not.

Quoted 6 lines

Handle the layout once for the whole family so no model can miss it, and do not load on models that are not known to work.

---

Boris suggested the 'do not load' idea. That *could* be its own patch and apply to all the families. IMO applying to all families is not worth the churn, but splitting the patch is a toss up to me.

Overall, looks good.

Thanks,
Yazen

#3 lore raw

PATCH 2/2 EDAC/amd64: Add support for Family 1Ah models 0x88 ... 0x8f

In reply to Vishal Badole

Family 1Ah models 0x88 ... 0x8f use the default settings for the 1Ah
family: 2 UMCs using the 'v2' register layout.

Add these models to the supported list so the module can decode and report memory errors on them.

---
 drivers/edac/amd64_edac.c | 1 +
 1 file changed, 1 insertion(+)
drivers/edac/amd64_edac.c +1 -0
index 7ba347bfd9a0..21ce1caa7151 100644
@@ -3894,6 +3894,7 @@ static int per_family_init(struct amd64_pvt *pvt)
 			pvt->max_mcs            = 12;
 			break;
 		case 0x40 ... 0x4f:
+		case 0x88 ... 0x8f:
 			break;
 		case 0x50 ... 0x57:
 		case 0xc0 ... 0xc7:
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] EDAC/amd64: Add support for Family 1Ah models 0x88 ... 0x8f

Quoted 7 lines · Vishal Badole

Family 1Ah models 0x88 ... 0x8f use the default settings for the 1Ah
family: 2 UMCs using the 'v2' register layout.

Add these models to the supported list so the module can decode and report memory errors on them.

I don't think this ^^^ is necessary.

Quoted 11 lines
---
 drivers/edac/amd64_edac.c | 1 +
 1 file changed, 1 insertion(+)
drivers/edac/amd64_edac.c +0 -0
index 7ba347bfd9a0..21ce1caa7151 100644

drivers/edac/amd64_edac.c static int per_family_init(struct amd64_pvt *pvt) · line 3900

Quoted 7 lines
drivers/edac/amd64_edac.c +1 -0
@@ -3894,6 +3894,7 @@ static int per_family_init(struct amd64_pvt *pvt)
 			pvt->max_mcs            = 12;
 			break;
 		case 0x40 ... 0x4f:
+		case 0x88 ... 0x8f:
 			break;
 		case 0x50 ... 0x57:
 		case 0xc0 ... 0xc7:

Otherwise, LGTM.

Thanks,
Yazen

maintainer Applied
#5 lore raw
In reply to Vishal Badole
Quoted 11 lines · Vishal Badole

This series cleans up the Family 1Ah model handling in amd64_edac and then adds support for the 0x88 ... 0x8f models.

Patch 1 consolidates the Family 1Ah setup: select the v2 UMC register layout once for the whole family instead of per model, and reject models that are not known to work.

Patch 2 adds the 0x88 ... 0x8f models, which use the default Family 1Ah settings (2 UMCs, v2 register layout), so the driver can decode and report memory errors on them.

Quoted 6 lines

Vishal Badole (2):
EDAC/amd64: Consolidate Family 1Ah model setup EDAC/amd64: Add support for Family 1Ah models 0x88 ... 0x8f

 drivers/edac/amd64_edac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette