amd64_edac: add DRAM error injection logic using sysfs
Quoted 86 lines · Ingo Molnar
From: Ingo Molnar <[email protected]>
Subject: Re: [PATCH 20/21]amd64_edac: add DRAM error injection logic using sysfs
To: "Doug Thompson" <[email protected]>
Cc: "Borislav Petkov" <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Date: Thursday, April 30, 2009, 2:34 AMQuoted 2 lines · Doug Thompson
I believe I failed to reply to ALL and replied only to
the sender
Quoted 4 lines
doug t
--- On Wed, 4/29/09, Ingo Molnar <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
From: Ingo Molnar <[email protected]>
Subject: Re: [PATCH 20/21]amd64_edac: add DRAMerror injection logic using sysfs
Quoted 2 lines
Quoted 2 lines
To: "Borislav Petkov" <[email protected]>
Cc: [email protected],[email protected], [email protected],
[email protected], [email protected],
[email protected]Quoted 15 lines
Quoted 15 lines
Date: Wednesday, April 29, 2009, 12:17 PM
Quoted 6 lines · Borislav Petkov
From: Doug Thompson <[email protected]>
Signed-off-by Doug Thompson <[email protected]>Signed-off-by Borislav Petkov <[email protected]>---
drivers/edac/amd64_edac.c| 287+++++++++++++++++++++++++++++++++++++++++++++
Quoted 1 line
1 files changed, 287 insertions(+), 0deletions(-)
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/edac/amd64_edac.cdrivers/edac/amd64_edac.c static ssize_t
Quoted 4 lines
index b1a7e8c..4d1076f 100644
drivers/edac/amd64_edac.c +0
-0@@ -4621,3 +4621,290 @@ static ssize_tamd64_hole_show(struct
mem_ctl_info*mci, char*data)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
#endif /* DEBUG */
+#ifdef
CONFIG_EDAC_AMD64_OPTERON_ERROR_INJECTIONQuoted 5 lines
Quoted 5 lines
this should be in a separate .c file under
drivers/edac/amd64/.Introducing large #ifdef sections like that is
not very
Quoted 2 lines
Quoted 2 lines
clean. The
amd64_edac.cfile is _way_ too large at more than5000
Quoted 6 lines
Quoted 4 lines
lines of
code.Ingo
If we broke this into a separate files, then there
would be TWO
Quoted 1 line
(2) files: 1 for the source code of the routines and a
1 for the
Quoted 1 line
table entries which reference those routines. Is that
then
Quoted 3 lines
acceptable as well?
Same pattern applies to the DEBUG functions Info
refers to in
Quoted 1 line
another thread: 2 separate files would be required as
well.
Quoted 6 lines
2 files for Error Injection code
2 files for DEBUG controls
1 files for text mappingand I assume all these would be included via an
Quoted 9 lines
#include statement
Quoted 1 line
at their appropriate locations
A
Makefilemight 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