* [PATCH] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel
@ 2014-09-05 19:28 Seth Jennings
2014-09-08 14:18 ` Aristeu Rozanski
0 siblings, 1 reply; 3+ messages in thread
From: Seth Jennings @ 2014-09-05 19:28 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Aristeu Rozanski, linux-edac, linux-kernel
Intel IA32 SDM Table 15-14 defines channel 0xf as 'not specified', but
EDAC doesn't know about this and returns and INTERNAL ERROR when the
channel is greater than NUM_CHANNELS:
kernel: [ 1538.886456] CPU 0: Machine Check Exception: 0 Bank 1: 940000000000009f
kernel: [ 1538.886669] TSC 2bc68b22e7e812 ADDR 46dae7000 MISC 0 PROCESSOR 0:306e4 TIME 1390414572 SOCKET 0 APIC 0
kernel: [ 1538.971948] EDAC MC1: INTERNAL ERROR: channel value is out of range (15 >= 4)
kernel: [ 1538.972203] EDAC MC1: 0 CE memory read error on unknown memory (slot:0 page:0x46dae7 offset:0x0 grain:0 syndrome:0x0 - area:DRAM err_code:0000:009f socket:1 channel_mask:1 rank:0)
This commit changes sb_edac to forward a channel of -1 to EDAC if the
channel is not specified. edac_mc_handle_error() sets the channel to -1
internally after the error message anyway, so this commit should have no
effect other than avoiding the INTERNAL ERROR message when the channel
is not specified.
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Cc: Aristeu Rozanski <aris@redhat.com>
Cc: linux-edac@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/edac/sb_edac.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 0034c48..07efed4 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -283,8 +283,9 @@ static const u32 correrrthrsld[] = {
* sbridge structs
*/
-#define NUM_CHANNELS 4
-#define MAX_DIMMS 3 /* Max DIMMS per channel */
+#define NUM_CHANNELS 4
+#define MAX_DIMMS 3 /* Max DIMMS per channel */
+#define CHANNEL_UNSPECIFIED 0xf /* Intel IA32 SDM 15-14 */
enum type {
SANDY_BRIDGE,
@@ -1991,6 +1992,9 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
/* FIXME: need support for channel mask */
+ if (channel == CHANNEL_UNSPECIFIED)
+ channel = -1;
+
/* Call the helper to output message */
edac_mc_handle_error(tp_event, mci, core_err_cnt,
m->addr >> PAGE_SHIFT, m->addr & ~PAGE_MASK, 0,
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel
2014-09-05 19:28 [PATCH] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel Seth Jennings
@ 2014-09-08 14:18 ` Aristeu Rozanski
2014-09-22 18:01 ` Seth Jennings
0 siblings, 1 reply; 3+ messages in thread
From: Aristeu Rozanski @ 2014-09-08 14:18 UTC (permalink / raw)
To: Seth Jennings; +Cc: Mauro Carvalho Chehab, linux-edac, linux-kernel
On Fri, Sep 05, 2014 at 02:28:47PM -0500, Seth Jennings wrote:
> Intel IA32 SDM Table 15-14 defines channel 0xf as 'not specified', but
> EDAC doesn't know about this and returns and INTERNAL ERROR when the
> channel is greater than NUM_CHANNELS:
>
> kernel: [ 1538.886456] CPU 0: Machine Check Exception: 0 Bank 1: 940000000000009f
> kernel: [ 1538.886669] TSC 2bc68b22e7e812 ADDR 46dae7000 MISC 0 PROCESSOR 0:306e4 TIME 1390414572 SOCKET 0 APIC 0
> kernel: [ 1538.971948] EDAC MC1: INTERNAL ERROR: channel value is out of range (15 >= 4)
> kernel: [ 1538.972203] EDAC MC1: 0 CE memory read error on unknown memory (slot:0 page:0x46dae7 offset:0x0 grain:0 syndrome:0x0 - area:DRAM err_code:0000:009f socket:1 channel_mask:1 rank:0)
>
> This commit changes sb_edac to forward a channel of -1 to EDAC if the
> channel is not specified. edac_mc_handle_error() sets the channel to -1
> internally after the error message anyway, so this commit should have no
> effect other than avoiding the INTERNAL ERROR message when the channel
> is not specified.
>
> Signed-off-by: Seth Jennings <sjenning@redhat.com>
> Cc: Aristeu Rozanski <aris@redhat.com>
> Cc: linux-edac@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/edac/sb_edac.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 0034c48..07efed4 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -283,8 +283,9 @@ static const u32 correrrthrsld[] = {
> * sbridge structs
> */
>
> -#define NUM_CHANNELS 4
> -#define MAX_DIMMS 3 /* Max DIMMS per channel */
> +#define NUM_CHANNELS 4
> +#define MAX_DIMMS 3 /* Max DIMMS per channel */
> +#define CHANNEL_UNSPECIFIED 0xf /* Intel IA32 SDM 15-14 */
>
> enum type {
> SANDY_BRIDGE,
> @@ -1991,6 +1992,9 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
>
> /* FIXME: need support for channel mask */
>
> + if (channel == CHANNEL_UNSPECIFIED)
> + channel = -1;
> +
> /* Call the helper to output message */
> edac_mc_handle_error(tp_event, mci, core_err_cnt,
> m->addr >> PAGE_SHIFT, m->addr & ~PAGE_MASK, 0,
Acked-by: Aristeu Rozanski <aris@redhat.com>
--
Aristeu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel
2014-09-08 14:18 ` Aristeu Rozanski
@ 2014-09-22 18:01 ` Seth Jennings
0 siblings, 0 replies; 3+ messages in thread
From: Seth Jennings @ 2014-09-22 18:01 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Aristeu Rozanski, linux-edac, linux-kernel
On Mon, Sep 08, 2014 at 10:18:51AM -0400, Aristeu Rozanski wrote:
> On Fri, Sep 05, 2014 at 02:28:47PM -0500, Seth Jennings wrote:
> > Intel IA32 SDM Table 15-14 defines channel 0xf as 'not specified', but
> > EDAC doesn't know about this and returns and INTERNAL ERROR when the
> > channel is greater than NUM_CHANNELS:
> >
> > kernel: [ 1538.886456] CPU 0: Machine Check Exception: 0 Bank 1: 940000000000009f
> > kernel: [ 1538.886669] TSC 2bc68b22e7e812 ADDR 46dae7000 MISC 0 PROCESSOR 0:306e4 TIME 1390414572 SOCKET 0 APIC 0
> > kernel: [ 1538.971948] EDAC MC1: INTERNAL ERROR: channel value is out of range (15 >= 4)
> > kernel: [ 1538.972203] EDAC MC1: 0 CE memory read error on unknown memory (slot:0 page:0x46dae7 offset:0x0 grain:0 syndrome:0x0 - area:DRAM err_code:0000:009f socket:1 channel_mask:1 rank:0)
> >
> > This commit changes sb_edac to forward a channel of -1 to EDAC if the
> > channel is not specified. edac_mc_handle_error() sets the channel to -1
> > internally after the error message anyway, so this commit should have no
> > effect other than avoiding the INTERNAL ERROR message when the channel
> > is not specified.
Hey Mauro,
I was wanting to make sure this was on your radar. I don't see it in
-next and haven't gotten any feedback or confirmation that the patch has
been accepted/rejected/needs work.
Seth
> >
> > Signed-off-by: Seth Jennings <sjenning@redhat.com>
> > Cc: Aristeu Rozanski <aris@redhat.com>
> > Cc: linux-edac@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
> > drivers/edac/sb_edac.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> > index 0034c48..07efed4 100644
> > --- a/drivers/edac/sb_edac.c
> > +++ b/drivers/edac/sb_edac.c
> > @@ -283,8 +283,9 @@ static const u32 correrrthrsld[] = {
> > * sbridge structs
> > */
> >
> > -#define NUM_CHANNELS 4
> > -#define MAX_DIMMS 3 /* Max DIMMS per channel */
> > +#define NUM_CHANNELS 4
> > +#define MAX_DIMMS 3 /* Max DIMMS per channel */
> > +#define CHANNEL_UNSPECIFIED 0xf /* Intel IA32 SDM 15-14 */
> >
> > enum type {
> > SANDY_BRIDGE,
> > @@ -1991,6 +1992,9 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
> >
> > /* FIXME: need support for channel mask */
> >
> > + if (channel == CHANNEL_UNSPECIFIED)
> > + channel = -1;
> > +
> > /* Call the helper to output message */
> > edac_mc_handle_error(tp_event, mci, core_err_cnt,
> > m->addr >> PAGE_SHIFT, m->addr & ~PAGE_MASK, 0,
>
> Acked-by: Aristeu Rozanski <aris@redhat.com>
>
> --
> Aristeu
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-22 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 19:28 [PATCH] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel Seth Jennings
2014-09-08 14:18 ` Aristeu Rozanski
2014-09-22 18:01 ` Seth Jennings
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.