Skip to content

Commit da9bb1d

Browse files
Alan-CoxLinus Torvalds
authored andcommitted
[PATCH] EDAC: core EDAC support code
This is a subset of the bluesmoke project core code, stripped of the NMI work which isn't ready to merge and some of the "interesting" proc functionality that needs reworking or just has no place in kernel. It requires no core kernel changes except the added scrub functions already posted. The goal is to merge further functionality only after the core code is accepted and proven in the base kernel, and only at the point the upstream extras are really ready to merge. From: doug thompson <norsk5@xmission.com> This converts EDAC to sysfs and is the final chunk neccessary before EDAC has a stable user space API and can be considered for submission into the base kernel. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: doug thompson <norsk5@xmission.com> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 2f768af commit da9bb1d

19 files changed

Lines changed: 3515 additions & 40 deletions

File tree

‎Documentation/drivers/edac/edac.txt‎

Lines changed: 673 additions & 0 deletions
Large diffs are not rendered by default.

‎MAINTAINERS‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,15 @@ L: ebtables-devel@lists.sourceforge.net
867867
W: http://ebtables.sourceforge.net/
868868
S: Maintained
869869

870+
EDAC-CORE
871+
P: Doug Thompson
872+
M: norsk5@xmission.com, dthompson@linuxnetworx.com
873+
P: Dave Peterson
874+
M: dsp@llnl.gov, dave_peterson@pobox.com
875+
L: bluesmoke-devel@lists.sourceforge.net
876+
W: bluesmoke.sourceforge.net
877+
S: Maintained
878+
870879
EEPRO100 NETWORK DRIVER
871880
P: Andrey V. Savochkin
872881
M: saw@saw.sw.com.sg

‎arch/i386/kernel/quirks.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
2525

2626
/* enable access to config space*/
2727
pci_read_config_byte(dev, 0xf4, &config);
28-
config |= 0x2;
29-
pci_write_config_byte(dev, 0xf4, config);
28+
pci_write_config_byte(dev, 0xf4, config|0x2);
3029

3130
/* read xTPR register */
3231
raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
@@ -42,9 +41,9 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
4241
#endif
4342
}
4443

45-
config &= ~0x2;
46-
/* disable access to config space*/
47-
pci_write_config_byte(dev, 0xf4, config);
44+
/* put back the original value for config space*/
45+
if (!(config & 0x2))
46+
pci_write_config_byte(dev, 0xf4, config);
4847
}
4948
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance);
5049
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance);

‎drivers/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,6 @@ source "drivers/infiniband/Kconfig"
6868

6969
source "drivers/sn/Kconfig"
7070

71+
source "drivers/edac/Kconfig"
72+
7173
endmenu

‎drivers/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ obj-$(CONFIG_PHONE) += telephony/
6363
obj-$(CONFIG_MD) += md/
6464
obj-$(CONFIG_BT) += bluetooth/
6565
obj-$(CONFIG_ISDN) += isdn/
66+
obj-$(CONFIG_EDAC) += edac/
6667
obj-$(CONFIG_MCA) += mca/
6768
obj-$(CONFIG_EISA) += eisa/
6869
obj-$(CONFIG_CPU_FREQ) += cpufreq/

‎drivers/edac/Kconfig‎

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#
2+
# EDAC Kconfig
3+
# Copyright (c) 2003 Linux Networx
4+
# Licensed and distributed under the GPL
5+
#
6+
# $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $
7+
#
8+
9+
menu 'EDAC - error detection and reporting (RAS)'
10+
11+
config EDAC
12+
tristate "EDAC core system error reporting"
13+
depends on X86
14+
default y
15+
help
16+
EDAC is designed to report errors in the core system.
17+
These are low-level errors that are reported in the CPU or
18+
supporting chipset: memory errors, cache errors, PCI errors,
19+
thermal throttling, etc.. If unsure, select 'Y'.
20+
21+
22+
comment "Reporting subsystems"
23+
depends on EDAC
24+
25+
config EDAC_DEBUG
26+
bool "Debugging"
27+
depends on EDAC
28+
help
29+
This turns on debugging information for the entire EDAC
30+
sub-system. You can insert module with "debug_level=x", current
31+
there're four debug levels (x=0,1,2,3 from low to high).
32+
Usually you should select 'N'.
33+
34+
config EDAC_MM_EDAC
35+
tristate "Main Memory EDAC (Error Detection And Correction) reporting"
36+
depends on EDAC
37+
default y
38+
help
39+
Some systems are able to detect and correct errors in main
40+
memory. EDAC can report statistics on memory error
41+
detection and correction (EDAC - or commonly referred to ECC
42+
errors). EDAC will also try to decode where these errors
43+
occurred so that a particular failing memory module can be
44+
replaced. If unsure, select 'Y'.
45+
46+
47+
config EDAC_AMD76X
48+
tristate "AMD 76x (760, 762, 768)"
49+
depends on EDAC_MM_EDAC && PCI
50+
help
51+
Support for error detection and correction on the AMD 76x
52+
series of chipsets used with the Athlon processor.
53+
54+
config EDAC_E7XXX
55+
tristate "Intel e7xxx (e7205, e7500, e7501, e7505)"
56+
depends on EDAC_MM_EDAC && PCI
57+
help
58+
Support for error detection and correction on the Intel
59+
E7205, E7500, E7501 and E7505 server chipsets.
60+
61+
config EDAC_E752X
62+
tristate "Intel e752x (e7520, e7525, e7320)"
63+
depends on EDAC_MM_EDAC && PCI
64+
help
65+
Support for error detection and correction on the Intel
66+
E7520, E7525, E7320 server chipsets.
67+
68+
config EDAC_I82875P
69+
tristate "Intel 82875p (D82875P, E7210)"
70+
depends on EDAC_MM_EDAC && PCI
71+
help
72+
Support for error detection and correction on the Intel
73+
DP82785P and E7210 server chipsets.
74+
75+
config EDAC_I82860
76+
tristate "Intel 82860"
77+
depends on EDAC_MM_EDAC && PCI
78+
help
79+
Support for error detection and correction on the Intel
80+
82860 chipset.
81+
82+
config EDAC_R82600
83+
tristate "Radisys 82600 embedded chipset"
84+
depends on EDAC_MM_EDAC
85+
help
86+
Support for error detection and correction on the Radisys
87+
82600 embedded chipset.
88+
89+
choice
90+
prompt "Error detecting method"
91+
depends on EDAC
92+
default EDAC_POLL
93+
94+
config EDAC_POLL
95+
bool "Poll for errors"
96+
depends on EDAC
97+
help
98+
Poll the chipset periodically to detect errors.
99+
100+
endchoice
101+
102+
endmenu

‎drivers/edac/Makefile‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Makefile for the Linux kernel EDAC drivers.
3+
#
4+
# Copyright 02 Jul 2003, Linux Networx (http://lnxi.com)
5+
# This file may be distributed under the terms of the
6+
# GNU General Public License.
7+
#
8+
# $Id: Makefile,v 1.4.2.3 2005/07/08 22:05:38 dsp_llnl Exp $
9+
10+
11+
obj-$(CONFIG_EDAC_MM_EDAC) += edac_mc.o
12+
obj-$(CONFIG_EDAC_AMD76X) += amd76x_edac.o
13+
obj-$(CONFIG_EDAC_E7XXX) += e7xxx_edac.o
14+
obj-$(CONFIG_EDAC_E752X) += e752x_edac.o
15+
obj-$(CONFIG_EDAC_I82875P) += i82875p_edac.o
16+
obj-$(CONFIG_EDAC_I82860) += i82860_edac.o
17+
obj-$(CONFIG_EDAC_R82600) += r82600_edac.o
18+

‎drivers/edac/amd76x_edac.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static struct pci_driver amd76x_driver = {
338338
.id_table = amd76x_pci_tbl,
339339
};
340340

341-
int __init amd76x_init(void)
341+
static int __init amd76x_init(void)
342342
{
343343
return pci_register_driver(&amd76x_driver);
344344
}

‎drivers/edac/e752x_edac.c‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Wang Zhenyu at intel.com
1414
* Dave Jiang at mvista.com
1515
*
16-
* $Id: bluesmoke_e752x.c,v 1.5.2.11 2005/10/05 00:43:44 dsp_llnl Exp $
16+
* $Id: edac_e752x.c,v 1.5.2.11 2005/10/05 00:43:44 dsp_llnl Exp $
1717
*
1818
*/
1919

@@ -376,14 +376,14 @@ static inline void process_threshold_ce(struct mem_ctl_info *mci, u16 error,
376376
mci->mc_idx);
377377
}
378378

379-
char *global_message[11] = {
379+
static char *global_message[11] = {
380380
"PCI Express C1", "PCI Express C", "PCI Express B1",
381381
"PCI Express B", "PCI Express A1", "PCI Express A",
382382
"DMA Controler", "HUB Interface", "System Bus",
383383
"DRAM Controler", "Internal Buffer"
384384
};
385385

386-
char *fatal_message[2] = { "Non-Fatal ", "Fatal " };
386+
static char *fatal_message[2] = { "Non-Fatal ", "Fatal " };
387387

388388
static void do_global_error(int fatal, u32 errors)
389389
{
@@ -405,7 +405,7 @@ static inline void global_error(int fatal, u32 errors, int *error_found,
405405
do_global_error(fatal, errors);
406406
}
407407

408-
char *hub_message[7] = {
408+
static char *hub_message[7] = {
409409
"HI Address or Command Parity", "HI Illegal Access",
410410
"HI Internal Parity", "Out of Range Access",
411411
"HI Data Parity", "Enhanced Config Access",
@@ -432,7 +432,7 @@ static inline void hub_error(int fatal, u8 errors, int *error_found,
432432
do_hub_error(fatal, errors);
433433
}
434434

435-
char *membuf_message[4] = {
435+
static char *membuf_message[4] = {
436436
"Internal PMWB to DRAM parity",
437437
"Internal PMWB to System Bus Parity",
438438
"Internal System Bus or IO to PMWB Parity",
@@ -458,6 +458,7 @@ static inline void membuf_error(u8 errors, int *error_found, int handle_error)
458458
do_membuf_error(errors);
459459
}
460460

461+
#if 0
461462
char *sysbus_message[10] = {
462463
"Addr or Request Parity",
463464
"Data Strobe Glitch",
@@ -469,6 +470,7 @@ char *sysbus_message[10] = {
469470
"Memory Parity",
470471
"IO Subsystem Parity"
471472
};
473+
#endif /* 0 */
472474

473475
static void do_sysbus_error(int fatal, u32 errors)
474476
{
@@ -1044,7 +1046,7 @@ static struct pci_driver e752x_driver = {
10441046
};
10451047

10461048

1047-
int __init e752x_init(void)
1049+
static int __init e752x_init(void)
10481050
{
10491051
int pci_rc;
10501052

‎drivers/edac/e7xxx_edac.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static struct pci_driver e7xxx_driver = {
537537
};
538538

539539

540-
int __init e7xxx_init(void)
540+
static int __init e7xxx_init(void)
541541
{
542542
return pci_register_driver(&e7xxx_driver);
543543
}

0 commit comments

Comments
 (0)