diff options
author | Dave Jiang <djiang@mvista.com> | 2007-07-19 04:49:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:53 -0400 |
commit | c0d121720220584bba2876b032e58a076b843fa1 (patch) | |
tree | 13ba24c6d875ded1494e1560f336b8551c663ef1 /drivers/edac/edac_mc.c | |
parent | 28f96eeafc89643d411d54c258788a8573576127 (diff) |
drivers/edac: add new nmi rescan
Provides a way for NMI reported errors on x86 to notify the EDAC
subsystem pending ECC errors by writing to a software state variable.
Here's the reworked patch. I added an EDAC stub to the kernel so we can
have variables that are in the kernel even if EDAC is a module. I also
implemented the idea of using the chip driver to select error detection
mode via module parameter and eliminate the kernel compile option.
Please review/test. Thx!
Also, I only made changes to some of the chipset drivers since I am
unfamiliar with the other ones. We can add similar changes as we go.
Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Douglas Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r-- | drivers/edac/edac_mc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index eae1ca1caebd..81a28d6662e4 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/sysdev.h> | 28 | #include <linux/sysdev.h> |
29 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
30 | #include <linux/edac.h> | ||
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <asm/page.h> | 32 | #include <asm/page.h> |
32 | #include <asm/edac.h> | 33 | #include <asm/edac.h> |
@@ -241,6 +242,7 @@ static int add_mc_to_global_list (struct mem_ctl_info *mci) | |||
241 | } | 242 | } |
242 | 243 | ||
243 | list_add_tail_rcu(&mci->link, insert_before); | 244 | list_add_tail_rcu(&mci->link, insert_before); |
245 | atomic_inc(&edac_handlers); | ||
244 | return 0; | 246 | return 0; |
245 | 247 | ||
246 | fail0: | 248 | fail0: |
@@ -267,6 +269,7 @@ static void complete_mc_list_del(struct rcu_head *head) | |||
267 | 269 | ||
268 | static void del_mc_from_global_list(struct mem_ctl_info *mci) | 270 | static void del_mc_from_global_list(struct mem_ctl_info *mci) |
269 | { | 271 | { |
272 | atomic_dec(&edac_handlers); | ||
270 | list_del_rcu(&mci->link); | 273 | list_del_rcu(&mci->link); |
271 | init_completion(&mci->complete); | 274 | init_completion(&mci->complete); |
272 | call_rcu(&mci->rcu, complete_mc_list_del); | 275 | call_rcu(&mci->rcu, complete_mc_list_del); |