public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
@ 2009-04-30 13:55 Doug Thompson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Thompson @ 2009-04-30 13:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Borislav Petkov, akpm, greg, tglx, hpa, dougthompson,
	linux-kernel


--- On Thu, 4/30/09, Ingo Molnar <mingo@elte.hu> wrote:

> From: Ingo Molnar <mingo@elte.hu>
> Subject: Re: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
> To: "Doug Thompson" <norsk5@yahoo.com>
> Cc: "Borislav Petkov" <borislav.petkov@amd.com>, akpm@linux-foundation.org, greg@kroah.com, tglx@linutronix.de, hpa@zytor.com, dougthompson@xmission.com, linux-kernel@vger.kernel.org
> Date: Thursday, April 30, 2009, 2:34 AM
> 
> * Doug Thompson <norsk5@yahoo.com>
> wrote:
> 
> > 
> > I believe I failed to reply to ALL and replied only to
> the sender
> > 
> > doug t
> > 
> > --- On Wed, 4/29/09, Ingo Molnar <mingo@elte.hu>
> wrote:
> > 
> > > From: Ingo Molnar <mingo@elte.hu>
> > > Subject: Re: [PATCH 20/21] amd64_edac: add DRAM
> error injection logic using sysfs
> > > To: "Borislav Petkov" <borislav.petkov@amd.com>
> > > Cc: akpm@linux-foundation.org,
> greg@kroah.com, tglx@linutronix.de,
> hpa@zytor.com, dougthompson@xmission.com,
> linux-kernel@vger.kernel.org
> > > Date: Wednesday, April 29, 2009, 12:17 PM
> > > 
> > > * Borislav Petkov <borislav.petkov@amd.com>
> > > wrote:
> > > 
> > > > From: Doug Thompson <dougthompson@xmission.com>
> > > > 
> > > > Signed-off-by: Doug Thompson <dougthompson@xmission.com>
> > > > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> > > > ---
> > > >  drivers/edac/amd64_edac.c |  287
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > > >  1 files changed, 287 insertions(+), 0
> > > deletions(-)
> > > > 
> > > > diff --git a/drivers/edac/amd64_edac.c
> > > b/drivers/edac/amd64_edac.c
> > > > index b1a7e8c..4d1076f 100644
> > > > --- a/drivers/edac/amd64_edac.c
> > > > +++ b/drivers/edac/amd64_edac.c
> > > > @@ -4621,3 +4621,290 @@ static ssize_t
> > > amd64_hole_show(struct mem_ctl_info *mci, char
> *data)
> > > >  
> > > >  #endif    /* DEBUG */
> > > >  
> > > > +#ifdef
> CONFIG_EDAC_AMD64_OPTERON_ERROR_INJECTION
> > > 
> > > this should be in a separate .c file under
> > > drivers/edac/amd64/. 
> > > 
> > > Introducing large #ifdef sections like that is
> not very
> > > clean. The 
> > > amd64_edac.c file is _way_ too large at more than
> 5000
> > > lines of 
> > > code.
> > > 
> > >     Ingo
> > 
> > If we broke this into a separate files, then there
> would be TWO 
> > (2) files: 1 for the source code of the routines and a
> 1 for the 
> > table entries which reference those routines. Is that
> then 
> > acceptable as well?
> > 
> > Same pattern applies to the DEBUG functions Info
> refers to in 
> > another thread: 2 separate files would be required as
> well.
> > 
> > 2 files for Error Injection code
> > 2 files for DEBUG controls
> > 1 files for text mapping
> > 
> > and I assume all these would be included via an
> #include statement 
> > at their appropriate locations
> 
> A Makefile might be more natural i think - that way the
> #ifdef turns 
> into a makefile rule?
> 
>     Ingo
> 

OK, yes for the separate and standalone functions themselves, but NOT for the function pointer table entries, which also share the table with the DEBUG function pointers and possibly function pointers to code that is not bracketed by #ifdefs 

The function pointer table itself is/can be composed of several entries, not just of the injection or debug kind. In this instance, that is what is there, but I would prefer to allow for future additions not tied to injection and/or debug origins nor of #ifdef bracketing

doug t


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
@ 2009-04-30  6:28 Doug Thompson
  2009-04-30  8:34 ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Doug Thompson @ 2009-04-30  6:28 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar
  Cc: akpm, greg, tglx, hpa, dougthompson, linux-kernel


I believe I failed to reply to ALL and replied only to the sender

doug t

--- On Wed, 4/29/09, Ingo Molnar <mingo@elte.hu> wrote:

> From: Ingo Molnar <mingo@elte.hu>
> Subject: Re: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
> To: "Borislav Petkov" <borislav.petkov@amd.com>
> Cc: akpm@linux-foundation.org, greg@kroah.com, tglx@linutronix.de, hpa@zytor.com, dougthompson@xmission.com, linux-kernel@vger.kernel.org
> Date: Wednesday, April 29, 2009, 12:17 PM
> 
> * Borislav Petkov <borislav.petkov@amd.com>
> wrote:
> 
> > From: Doug Thompson <dougthompson@xmission.com>
> > 
> > Signed-off-by: Doug Thompson <dougthompson@xmission.com>
> > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> > ---
> >  drivers/edac/amd64_edac.c |  287
> +++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 287 insertions(+), 0
> deletions(-)
> > 
> > diff --git a/drivers/edac/amd64_edac.c
> b/drivers/edac/amd64_edac.c
> > index b1a7e8c..4d1076f 100644
> > --- a/drivers/edac/amd64_edac.c
> > +++ b/drivers/edac/amd64_edac.c
> > @@ -4621,3 +4621,290 @@ static ssize_t
> amd64_hole_show(struct mem_ctl_info *mci, char *data)
> >  
> >  #endif    /* DEBUG */
> >  
> > +#ifdef CONFIG_EDAC_AMD64_OPTERON_ERROR_INJECTION
> 
> this should be in a separate .c file under
> drivers/edac/amd64/. 
> 
> Introducing large #ifdef sections like that is not very
> clean. The 
> amd64_edac.c file is _way_ too large at more than 5000
> lines of 
> code.
> 
>     Ingo

If we broke this into a separate files, then there would be TWO (2) files: 1 for the source code of the routines and a 1 for the table entries which reference those routines. Is that then acceptable as well?

Same pattern applies to the DEBUG functions Info refers to in another thread:  2 separate files would be required as well.

2 files for Error Injection code
2 files for DEBUG controls
1 files for text mapping

and I assume all these would be included via an #include statement at their appropriate locations

thx

doug t


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [RFC PATCH 00/21 v2] amd64_edac: EDAC module for AMD64
@ 2009-04-29 16:54 Borislav Petkov
  2009-04-29 16:55 ` [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2009-04-29 16:54 UTC (permalink / raw)
  To: akpm, greg
  Cc: mingo, tglx, hpa, dougthompson, linux-kernel, Borislav Petkov,
	Doug Thompson

Hi,

thanks to all reviewers of the previous submission, here is the second
version of this series.

Highlights are the addition of two helpers to read/write MSRs on several
CPUs, denoted by a cpumask and using an array of MSR values per-CPU, as
Peter suggested. Since IMHO they look generic enough I've added them to
arch/x86/lib/msr-on-cpu.c (now renamed to msr.c).

Moreover, I've addressed all the issues raised from the previous series.
Please let me know should there be anything else remaining.

Thanks,
Boris.

 arch/x86/include/asm/msr.h |   11 +
 arch/x86/lib/Makefile      |    2 +-
 arch/x86/lib/msr-on-cpu.c  |   97 -
 arch/x86/lib/msr.c         |  151 ++
 drivers/edac/Kconfig       |   26 +
 drivers/edac/Makefile      |    1 +
 drivers/edac/amd64_edac.c  | 5385 ++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 5575 insertions(+), 98 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [RFC PATCH 00/21] amd64_edac: EDAC module for AMD64
@ 2009-04-28 15:05 Borislav Petkov
  2009-04-28 15:06 ` [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2009-04-28 15:05 UTC (permalink / raw)
  To: akpm, greg; +Cc: linux-kernel, Borislav Petkov

Hi Andrew,
hi Greg,

I think you've already heard about this driver, so here is a first
upstream submission request. It is quite sizable but partly the reason
for it is that it handles ECC detection and reporting for all AMD
K8, F10h and F11h families. It also implements DRAM error injection
functionality, failing DIMM module detection and some other fun stuff
found on F10h and later CPUs.

We've been doing testing/bugfixing/scrubbing here for some time, have
converted it to using kernel facilities and basically removed some slack
from it like glue code due to it being maintained out-of-tree. Please
take a look and let us know of any objections/comments you might have so
that we could tackle them on time.

Thanks in advance.

 drivers/edac/Kconfig      |   26 +
 drivers/edac/Makefile     |    1 +
 drivers/edac/amd64_edac.c | 5249 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 5276 insertions(+), 0 deletions(-)


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

end of thread, other threads:[~2009-05-05  0:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 13:55 [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Doug Thompson
  -- strict thread matches above, loose matches on Subject: below --
2009-04-30  6:28 Doug Thompson
2009-04-30  8:34 ` Ingo Molnar
2009-04-29 16:54 [RFC PATCH 00/21 v2] amd64_edac: EDAC module for AMD64 Borislav Petkov
2009-04-29 16:55 ` [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Borislav Petkov
2009-04-29 18:17   ` Ingo Molnar
2009-05-05  0:06   ` Mauro Carvalho Chehab
2009-04-28 15:05 [RFC PATCH 00/21] amd64_edac: EDAC module for AMD64 Borislav Petkov
2009-04-28 15:06 ` [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Borislav Petkov

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