Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 750

kernel-2.6.18-238.el5.src.rpm

From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Tue, 17 Nov 2009 18:22:20 -0500
Subject: [edac] i3200_edac: backport driver to RHEL 5.5
Message-id: <4B02E9DC.5030808@redhat.com>
Patchwork-id: 21405
O-Subject: [PATCH RHEL 5.5 2/2] Backport i3200 driver to RHEL 5
Bugzilla: 469976
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>

Bugzilla #469976

i3200: Backport to RHEL5 and add it to the building system

The driver were tested by the customer and reported to work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index e1a5764..95a94d5 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -91,6 +91,13 @@ config EDAC_I3000
 	  Support for error detection and correction on the Intel
 	  3000 and 3010 server chipsets.
 
+config EDAC_I3200
+	tristate "Intel 3200"
+	depends on EDAC_MM_EDAC && PCI && X86 && EXPERIMENTAL
+	help
+	  Support for error detection and correction on the Intel
+	  3200 and 3210 server chipsets.
+
 config EDAC_I5000
 	tristate "Intel 5000 chipsets (Greencreek/Blackford)"
 	depends on EDAC_MM_EDAC && PCI && X86
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile
index c6681fd..a48f46c 100644
--- a/drivers/edac/Makefile
+++ b/drivers/edac/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_EDAC_E7XXX)		+= e7xxx_edac.o
 obj-$(CONFIG_EDAC_E752X)		+= e752x_edac.o
 obj-$(CONFIG_EDAC_I82875P)		+= i82875p_edac.o
 obj-$(CONFIG_EDAC_I3000)		+= i3000_edac.o
+obj-$(CONFIG_EDAC_I3200)                += i3200_edac.o
 obj-$(CONFIG_EDAC_I5000)		+= i5000_edac.o
 obj-$(CONFIG_EDAC_I5400)		+= i5400_edac.o
 obj-$(CONFIG_EDAC_I82860)		+= i82860_edac.o
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index fde4db9..b8df953 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -12,9 +12,8 @@
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
 #include <linux/slab.h>
-#include <linux/edac.h>
 #include <linux/io.h>
-#include "edac_core.h"
+#include "edac_mc.h"
 
 #define I3200_REVISION        "1.1"
 
@@ -100,6 +99,13 @@ struct i3200_priv {
 	void __iomem *window;
 };
 
+#ifndef readq
+static inline u64 readq(const volatile void __iomem *addr)
+{
+	 return *(volatile u64 __force *) addr;
+}
+#endif
+
 static int nr_channels;
 
 static int how_many_channels(struct pci_dev *pdev)
@@ -336,7 +342,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
 	nr_channels = how_many_channels(pdev);
 
 	mci = edac_mc_alloc(sizeof(struct i3200_priv), I3200_RANKS,
-		nr_channels, 0);
+		nr_channels);
 	if (!mci)
 		return -ENOMEM;
 
@@ -351,7 +357,6 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
 	mci->mod_name = EDAC_MOD_STR;
 	mci->mod_ver = I3200_REVISION;
 	mci->ctl_name = i3200_devs[dev_idx].ctl_name;
-	mci->dev_name = pci_name(pdev);
 	mci->edac_check = i3200_check;
 	mci->ctl_page_to_phys = NULL;
 	priv = mci->pvt_info;
@@ -393,7 +398,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
 	i3200_clear_error_info(mci);
 
 	rc = -ENODEV;
-	if (edac_mc_add_mc(mci)) {
+	if (edac_mc_add_mc(mci, 0)) {
 		debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__);
 		goto fail;
 	}
@@ -468,9 +473,6 @@ static int __init i3200_init(void)
 
 	debugf3("MC: %s()\n", __func__);
 
-	/* Ensure that the OPSTATE is set correctly for POLL or NMI */
-	opstate_init();
-
 	pci_rc = pci_register_driver(&i3200_driver);
 	if (pci_rc < 0)
 		goto fail0;
@@ -522,6 +524,3 @@ module_exit(i3200_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Akamai Technologies, Inc.");
 MODULE_DESCRIPTION("MC support for Intel 3200 memory hub controllers");
-
-module_param(edac_op_state, int, 0444);
-MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");