Skip to contentSkip to conversation

AMD64_EDAC: Fix logic to determine channel for F15 M30h processors

PATCH Applied Aravind Gopalakrishnan 2 participants 5 messages Jan 21, 2014 – Feb 7, 2014

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

PATCH 1/1 AMD64_EDAC: Fix logic to determine channel for F15 M30h processors

The current logic that returns (sys_addr >> 8) & 0x7 when num_dcts_intlv = 4 is incorrect. We should really be doing- If intlv_addr = 0x4, then interleave on bits [9:8] and if intlv_addr = 0x5, interleave on bits [10:9].

Refer F15 M30h BKDG D18F2x110[7:6] (DRAM Controller Select Low) (Link:http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf)

Tested on F15 M30h with mce_inj module and patch did not cause any regressions.

---
 drivers/edac/amd64_edac.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/edac/amd64_edac.c +11 -3
index b53d0de..ef9fe30 100644
@@ -1240,9 +1240,17 @@ static u8 f15_m30h_determine_channel(struct amd64_pvt *pvt, u64 sys_addr,
 	if (num_dcts_intlv == 2) {
 		select = (sys_addr >> 8) & 0x3;
 		channel = select ? 0x3 : 0;
-	} else if (num_dcts_intlv == 4)
-		channel = (sys_addr >> 8) & 0x7;
-
+	} else if (num_dcts_intlv == 4) {
+		u8 intlv_addr = dct_sel_interleave_addr(pvt);
+		switch (intlv_addr) {
+		case 0x4:
+			channel = (sys_addr >> 8) & 0x3;
+			break;
+		case 0x5:
+			channel = (sys_addr >> 9) & 0x3;
+			break;
+		}
+	}
 	return channel;
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Aravind Gopalakrishnan

The current logic that returns (sys_addr >> 8) & 0x7 when num_dcts_intlv = 4 is incorrect. We should really be doing- If intlv_addr = 0x4, then interleave on bits [9:8] and if intlv_addr = 0x5, interleave on bits [10:9].

Quoted 9 lines

Refer F15 M30h BKDG D18F2x110[7:6] (DRAM Controller Select Low) (Link:http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf)

Tested on F15 M30h with mce_inj module and patch did not cause any regressions.

---

Ping..

-Aravind.

maintainer
#2 lore raw
Quoted 9 lines · Aravind Gopalakrishnan
Quoted 8 lines · Aravind Gopalakrishnan

The current logic that returns (sys_addr >> 8) & 0x7 when num_dcts_intlv = 4 is incorrect. We should really be doing- If intlv_addr = 0x4, then interleave on bits [9:8] and if intlv_addr = 0x5, interleave on bits [10:9].

Refer F15 M30h BKDG D18F2x110[7:6] (DRAM Controller Select Low) (Link:http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf)

Quoted 8 lines
Quoted 6 lines

Tested on F15 M30h with mce_inj module and patch did not cause any regressions.

---

Ping..

I haven't forgotten you - it's just that I'm not taking any patches during the merge window. Now that it is over, all is back to normal.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#3 lore raw
Quoted 13 lines · Borislav Petkov
Quoted 12 lines · Aravind Gopalakrishnan
Quoted 11 lines · Aravind Gopalakrishnan

The current logic that returns (sys_addr >> 8) & 0x7 when num_dcts_intlv = 4 is incorrect. We should really be doing- If intlv_addr = 0x4, then interleave on bits [9:8] and if intlv_addr = 0x5, interleave on bits [10:9].

Refer F15 M30h BKDG D18F2x110[7:6] (DRAM Controller Select Low) (Link:http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf)

Tested on F15 M30h with mce_inj module and patch did not cause any regressions.

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

---

Ping..

I haven't forgotten you - it's just that I'm not taking any patches during the merge window.

yes, I realised :)
Just noticed rc1 on kernel.org; hence the ping..

Thanks in advance
-Aravind.

maintainer Applied
#4 lore raw
In reply to Aravind Gopalakrishnan
Quoted 5 lines · Aravind Gopalakrishnan

The current logic that returns (sys_addr >> 8) & 0x7 when num_dcts_intlv = 4 is incorrect. We should really be doing- If intlv_addr = 0x4, then interleave on bits [9:8] and if intlv_addr = 0x5, interleave on bits [10:9].

Quoted 7 lines

Refer F15 M30h BKDG D18F2x110[7:6] (DRAM Controller Select Low) (Link:http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf)

Tested on F15 M30h with mce_inj module and patch did not cause any regressions.

Applied, thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--