public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors
@ 2014-01-21 21:03 Aravind Gopalakrishnan
  2014-02-03 19:10 ` Aravind Gopalakrishnan
  2014-02-07 14:01 ` Borislav Petkov
  0 siblings, 2 replies; 5+ messages in thread
From: Aravind Gopalakrishnan @ 2014-01-21 21:03 UTC (permalink / raw)
  To: dougthompson, bp, linux-edac, linux-kernel; +Cc: 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.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
 drivers/edac/amd64_edac.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index b53d0de..ef9fe30 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -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;
 }
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors
  2014-01-21 21:03 [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors Aravind Gopalakrishnan
@ 2014-02-03 19:10 ` Aravind Gopalakrishnan
  2014-02-03 19:32   ` Borislav Petkov
  2014-02-07 14:01 ` Borislav Petkov
  1 sibling, 1 reply; 5+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-03 19:10 UTC (permalink / raw)
  To: dougthompson, bp, linux-edac, linux-kernel

On 1/21/2014 3:03 PM, Aravind Gopalakrishnan wrote:
> 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.
>
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> ---
>

Ping..

-Aravind.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors
  2014-02-03 19:10 ` Aravind Gopalakrishnan
@ 2014-02-03 19:32   ` Borislav Petkov
  2014-02-03 19:37     ` Aravind Gopalakrishnan
  0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2014-02-03 19:32 UTC (permalink / raw)
  To: Aravind Gopalakrishnan; +Cc: dougthompson, linux-edac, linux-kernel

On Mon, Feb 03, 2014 at 01:10:42PM -0600, Aravind Gopalakrishnan wrote:
> On 1/21/2014 3:03 PM, Aravind Gopalakrishnan wrote:
> >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.
> >
> >Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> >---
> >
> 
> 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.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors
  2014-02-03 19:32   ` Borislav Petkov
@ 2014-02-03 19:37     ` Aravind Gopalakrishnan
  0 siblings, 0 replies; 5+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-03 19:37 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: dougthompson, linux-edac, linux-kernel

On 2/3/2014 1:32 PM, Borislav Petkov wrote:
> On Mon, Feb 03, 2014 at 01:10:42PM -0600, Aravind Gopalakrishnan wrote:
>> On 1/21/2014 3:03 PM, Aravind Gopalakrishnan wrote:
>>> 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.
>>>
>>> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
>>> ---
>>>
>> 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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors
  2014-01-21 21:03 [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors Aravind Gopalakrishnan
  2014-02-03 19:10 ` Aravind Gopalakrishnan
@ 2014-02-07 14:01 ` Borislav Petkov
  1 sibling, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2014-02-07 14:01 UTC (permalink / raw)
  To: Aravind Gopalakrishnan; +Cc: dougthompson, linux-edac, linux-kernel

On Tue, Jan 21, 2014 at 03:03:36PM -0600, Aravind Gopalakrishnan wrote:
> 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.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-07 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 21:03 [PATCH] AMD64_EDAC: Fix logic to determine channel for F15 M30h processors Aravind Gopalakrishnan
2014-02-03 19:10 ` Aravind Gopalakrishnan
2014-02-03 19:32   ` Borislav Petkov
2014-02-03 19:37     ` Aravind Gopalakrishnan
2014-02-07 14:01 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox