Skip to content

Commit

Permalink
[PATCH] EDAC: core EDAC support code
Browse files Browse the repository at this point in the history
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 <[email protected]>

  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 <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: doug thompson <[email protected]>
Signed-off-by: Pavel Machek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan-Cox authored and Linus Torvalds committed Jan 19, 2006
1 parent 2f768af commit da9bb1d
Show file tree
Hide file tree
Showing 19 changed files with 3,515 additions and 40 deletions.
673 changes: 673 additions & 0 deletions Documentation/drivers/edac/edac.txt

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,15 @@ L: [email protected]
W: http://ebtables.sourceforge.net/
S: Maintained

EDAC-CORE
P: Doug Thompson
M: [email protected], [email protected]
P: Dave Peterson
M: [email protected], [email protected]
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained

EEPRO100 NETWORK DRIVER
P: Andrey V. Savochkin
M: [email protected]
Expand Down
9 changes: 4 additions & 5 deletions arch/i386/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)

/* enable access to config space*/
pci_read_config_byte(dev, 0xf4, &config);
config |= 0x2;
pci_write_config_byte(dev, 0xf4, config);
pci_write_config_byte(dev, 0xf4, config|0x2);

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

config &= ~0x2;
/* disable access to config space*/
pci_write_config_byte(dev, 0xf4, config);
/* put back the original value for config space*/
if (!(config & 0x2))
pci_write_config_byte(dev, 0xf4, config);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance);
Expand Down
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ source "drivers/infiniband/Kconfig"

source "drivers/sn/Kconfig"

source "drivers/edac/Kconfig"

endmenu
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ obj-$(CONFIG_PHONE) += telephony/
obj-$(CONFIG_MD) += md/
obj-$(CONFIG_BT) += bluetooth/
obj-$(CONFIG_ISDN) += isdn/
obj-$(CONFIG_EDAC) += edac/
obj-$(CONFIG_MCA) += mca/
obj-$(CONFIG_EISA) += eisa/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
Expand Down
102 changes: 102 additions & 0 deletions drivers/edac/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#
# EDAC Kconfig
# Copyright (c) 2003 Linux Networx
# Licensed and distributed under the GPL
#
# $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $
#

menu 'EDAC - error detection and reporting (RAS)'

config EDAC
tristate "EDAC core system error reporting"
depends on X86
default y
help
EDAC is designed to report errors in the core system.
These are low-level errors that are reported in the CPU or
supporting chipset: memory errors, cache errors, PCI errors,
thermal throttling, etc.. If unsure, select 'Y'.


comment "Reporting subsystems"
depends on EDAC

config EDAC_DEBUG
bool "Debugging"
depends on EDAC
help
This turns on debugging information for the entire EDAC
sub-system. You can insert module with "debug_level=x", current
there're four debug levels (x=0,1,2,3 from low to high).
Usually you should select 'N'.

config EDAC_MM_EDAC
tristate "Main Memory EDAC (Error Detection And Correction) reporting"
depends on EDAC
default y
help
Some systems are able to detect and correct errors in main
memory. EDAC can report statistics on memory error
detection and correction (EDAC - or commonly referred to ECC
errors). EDAC will also try to decode where these errors
occurred so that a particular failing memory module can be
replaced. If unsure, select 'Y'.


config EDAC_AMD76X
tristate "AMD 76x (760, 762, 768)"
depends on EDAC_MM_EDAC && PCI
help
Support for error detection and correction on the AMD 76x
series of chipsets used with the Athlon processor.

config EDAC_E7XXX
tristate "Intel e7xxx (e7205, e7500, e7501, e7505)"
depends on EDAC_MM_EDAC && PCI
help
Support for error detection and correction on the Intel
E7205, E7500, E7501 and E7505 server chipsets.

config EDAC_E752X
tristate "Intel e752x (e7520, e7525, e7320)"
depends on EDAC_MM_EDAC && PCI
help
Support for error detection and correction on the Intel
E7520, E7525, E7320 server chipsets.

config EDAC_I82875P
tristate "Intel 82875p (D82875P, E7210)"
depends on EDAC_MM_EDAC && PCI
help
Support for error detection and correction on the Intel
DP82785P and E7210 server chipsets.

config EDAC_I82860
tristate "Intel 82860"
depends on EDAC_MM_EDAC && PCI
help
Support for error detection and correction on the Intel
82860 chipset.

config EDAC_R82600
tristate "Radisys 82600 embedded chipset"
depends on EDAC_MM_EDAC
help
Support for error detection and correction on the Radisys
82600 embedded chipset.

choice
prompt "Error detecting method"
depends on EDAC
default EDAC_POLL

config EDAC_POLL
bool "Poll for errors"
depends on EDAC
help
Poll the chipset periodically to detect errors.

endchoice

endmenu
18 changes: 18 additions & 0 deletions drivers/edac/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Makefile for the Linux kernel EDAC drivers.
#
# Copyright 02 Jul 2003, Linux Networx (http://lnxi.com)
# This file may be distributed under the terms of the
# GNU General Public License.
#
# $Id: Makefile,v 1.4.2.3 2005/07/08 22:05:38 dsp_llnl Exp $


obj-$(CONFIG_EDAC_MM_EDAC) += edac_mc.o
obj-$(CONFIG_EDAC_AMD76X) += amd76x_edac.o
obj-$(CONFIG_EDAC_E7XXX) += e7xxx_edac.o
obj-$(CONFIG_EDAC_E752X) += e752x_edac.o
obj-$(CONFIG_EDAC_I82875P) += i82875p_edac.o
obj-$(CONFIG_EDAC_I82860) += i82860_edac.o
obj-$(CONFIG_EDAC_R82600) += r82600_edac.o

2 changes: 1 addition & 1 deletion drivers/edac/amd76x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static struct pci_driver amd76x_driver = {
.id_table = amd76x_pci_tbl,
};

int __init amd76x_init(void)
static int __init amd76x_init(void)
{
return pci_register_driver(&amd76x_driver);
}
Expand Down
14 changes: 8 additions & 6 deletions drivers/edac/e752x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Wang Zhenyu at intel.com
* Dave Jiang at mvista.com
*
* $Id: bluesmoke_e752x.c,v 1.5.2.11 2005/10/05 00:43:44 dsp_llnl Exp $
* $Id: edac_e752x.c,v 1.5.2.11 2005/10/05 00:43:44 dsp_llnl Exp $
*
*/

Expand Down Expand Up @@ -376,14 +376,14 @@ static inline void process_threshold_ce(struct mem_ctl_info *mci, u16 error,
mci->mc_idx);
}

char *global_message[11] = {
static char *global_message[11] = {
"PCI Express C1", "PCI Express C", "PCI Express B1",
"PCI Express B", "PCI Express A1", "PCI Express A",
"DMA Controler", "HUB Interface", "System Bus",
"DRAM Controler", "Internal Buffer"
};

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

static void do_global_error(int fatal, u32 errors)
{
Expand All @@ -405,7 +405,7 @@ static inline void global_error(int fatal, u32 errors, int *error_found,
do_global_error(fatal, errors);
}

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

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

#if 0
char *sysbus_message[10] = {
"Addr or Request Parity",
"Data Strobe Glitch",
Expand All @@ -469,6 +470,7 @@ char *sysbus_message[10] = {
"Memory Parity",
"IO Subsystem Parity"
};
#endif /* 0 */

static void do_sysbus_error(int fatal, u32 errors)
{
Expand Down Expand Up @@ -1044,7 +1046,7 @@ static struct pci_driver e752x_driver = {
};


int __init e752x_init(void)
static int __init e752x_init(void)
{
int pci_rc;

Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/e7xxx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ static struct pci_driver e7xxx_driver = {
};


int __init e7xxx_init(void)
static int __init e7xxx_init(void)
{
return pci_register_driver(&e7xxx_driver);
}
Expand Down
Loading

0 comments on commit da9bb1d

Please sign in to comment.