public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/21 v2] amd64_edac: EDAC module for AMD64
@ 2009-04-29 16:54 Borislav Petkov
  2009-04-29 16:54 ` [PATCH 01/21] x86: add methods for writing of an MSR on several CPUs Borislav Petkov
                   ` (21 more replies)
  0 siblings, 22 replies; 72+ 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] 72+ messages in thread
* Re: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
@ 2009-04-30 13:55 Doug Thompson
  0 siblings, 0 replies; 72+ 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] 72+ 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; 72+ 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] 72+ 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; 72+ 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] 72+ messages in thread

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

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 16:54 [RFC PATCH 00/21 v2] amd64_edac: EDAC module for AMD64 Borislav Petkov
2009-04-29 16:54 ` [PATCH 01/21] x86: add methods for writing of an MSR on several CPUs Borislav Petkov
2009-04-29 17:39   ` H. Peter Anvin
2009-05-04 16:46     ` Borislav Petkov
2009-05-04 17:25       ` H. Peter Anvin
2009-05-04 17:53         ` Borislav Petkov
2009-05-04 20:51           ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 02/21] amd64_edac: add PCI config register defines Borislav Petkov
2009-05-04 20:54   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 03/21] amd64_edac: add driver structs Borislav Petkov
2009-05-04 20:38   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 04/21] amd64_edac: add memory scrubber interface Borislav Petkov
2009-05-04 21:02   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 05/21] amd64_edac: add sys addr to memory controller mapping helpers Borislav Petkov
2009-05-04 21:08   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 06/21] amd64_edac: add functionality to compute the DRAM hole Borislav Petkov
2009-05-04 21:22   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 07/21] amd64_edac: add DRAM address type conversion facilities Borislav Petkov
2009-05-04 21:39   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 08/21] amd64_edac: add helper to dump relevant registers Borislav Petkov
2009-05-04 21:43   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 09/21] amd64_edac: assign DRAM chip select base and mask in a family-specific way Borislav Petkov
2009-05-04 21:59   ` Mauro Carvalho Chehab
2009-05-05 10:25     ` Borislav Petkov
2009-04-29 16:54 ` [PATCH 10/21] amd64_edac: add k8-specific methods Borislav Petkov
2009-05-04 22:06   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 11/21] amd64_edac: add f10-and-later methods-p1 Borislav Petkov
2009-05-04 22:10   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 12/21] amd64_edac: add f10-and-later methods-p2 Borislav Petkov
2009-05-04 23:25   ` Mauro Carvalho Chehab
2009-04-29 16:54 ` [PATCH 13/21] amd64_edac: add f10-and-later methods-p3 Borislav Petkov
2009-04-29 18:22   ` Ingo Molnar
2009-04-29 18:24     ` Ingo Molnar
2009-04-29 19:05     ` Andrew Morton
2009-04-29 19:23       ` Ingo Molnar
2009-04-29 19:42         ` Andrew Morton
2009-04-29 19:53           ` Ingo Molnar
2009-04-29 20:47             ` Ingo Molnar
2009-04-30 10:01               ` Borislav Petkov
2009-04-30 10:42                 ` Ingo Molnar
2009-05-04 23:36   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 14/21] amd64_edac: add per-family descriptors Borislav Petkov
2009-05-04 23:39   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 15/21] amd64_edac: add ECC chipkill syndrome mapping table Borislav Petkov
2009-05-04 23:42   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 16/21] amd64_edac: add error decoding logic Borislav Petkov
2009-04-29 18:19   ` Ingo Molnar
2009-05-04 23:48   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 17/21] amd64_edac: add EDAC core-related initializers Borislav Petkov
2009-05-04 23:53   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 18/21] amd64_edac: add ECC reporting initializers Borislav Petkov
2009-05-04 23:59   ` Mauro Carvalho Chehab
2009-04-29 16:55 ` [PATCH 19/21] amd64_edac: add debugging/testing code Borislav Petkov
2009-04-29 18:18   ` Ingo Molnar
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-29 16:55 ` [PATCH 21/21] amd64_edac: add module registration routines Borislav Petkov
2009-05-05  0:10   ` Mauro Carvalho Chehab
2009-04-29 19:30 ` [RFC PATCH 00/21 v2] amd64_edac: EDAC module for AMD64 Andi Kleen
2009-04-30 11:57   ` Borislav Petkov
2009-04-30 12:21     ` Ingo Molnar
2009-04-30 12:47     ` Andi Kleen
2009-04-30 14:48       ` Aristeu Rozanski
2009-05-01  7:53         ` Borislav Petkov
2009-05-03  0:32           ` Aristeu Rozanski
2009-04-30 18:37       ` Mauro Carvalho Chehab
2009-05-01 12:39       ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2009-04-30 13:55 [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Doug Thompson
2009-04-30  6:28 Doug Thompson
2009-04-30  8:34 ` Ingo Molnar
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