aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-20 13:45:52 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-20 13:45:52 -0500
commit1339730e73f14673ad55bddda119982504633da9 (patch)
tree56306454f0cf7152e60dac6030afe07ed667c574 /drivers/edac
parent1c069100c1f5577ecde06b3a366b73f520854c4e (diff)
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
Merge tag 'v3.8-rc7' into next
Linux 3.8-rc7 * tag 'v3.8-rc7': (12052 commits) Linux 3.8-rc7 net: sctp: sctp_endpoint_free: zero out secret key data net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree atm/iphase: rename fregt_t -> ffreg_t ARM: 7641/1: memory: fix broken mmap by ensuring TASK_UNMAPPED_BASE is aligned ARM: DMA mapping: fix bad atomic test ARM: realview: ensure that we have sufficient IRQs available ARM: GIC: fix GIC cpumask initialization net: usb: fix regression from FLAG_NOARP code l2tp: dont play with skb->truesize net: sctp: sctp_auth_key_put: use kzfree instead of kfree netback: correct netbk_tx_err to handle wrap around. xen/netback: free already allocated memory on failure in xen_netbk_get_requests xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. xen/netback: shutdown the ring if it contains garbage. drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try virtio_console: Don't access uninitialized data. net: qmi_wwan: add more Huawei devices, including E320 net: cdc_ncm: add another Huawei vendor specific device ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit() ...
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/Kconfig35
-rw-r--r--drivers/edac/Makefile5
-rw-r--r--drivers/edac/amd64_edac.c8
-rw-r--r--drivers/edac/amd76x_edac.c8
-rw-r--r--drivers/edac/cell_edac.c8
-rw-r--r--drivers/edac/cpc925_edac.c2
-rw-r--r--drivers/edac/e752x_edac.c7
-rw-r--r--drivers/edac/e7xxx_edac.c7
-rw-r--r--drivers/edac/edac_mc.c6
-rw-r--r--drivers/edac/edac_mc_sysfs.c19
-rw-r--r--drivers/edac/edac_pci_sysfs.c2
-rw-r--r--drivers/edac/highbank_l2_edac.c2
-rw-r--r--drivers/edac/highbank_mc_edac.c6
-rw-r--r--drivers/edac/i3000_edac.c7
-rw-r--r--drivers/edac/i3200_edac.c7
-rw-r--r--drivers/edac/i5000_edac.c7
-rw-r--r--drivers/edac/i5100_edac.c24
-rw-r--r--drivers/edac/i5400_edac.c7
-rw-r--r--drivers/edac/i7300_edac.c9
-rw-r--r--drivers/edac/i7core_edac.c7
-rw-r--r--drivers/edac/i82443bxgx_edac.c8
-rw-r--r--drivers/edac/i82860_edac.c8
-rw-r--r--drivers/edac/i82875p_edac.c8
-rw-r--r--drivers/edac/i82975x_edac.c8
-rw-r--r--drivers/edac/mpc85xx_edac.c8
-rw-r--r--drivers/edac/mv64x60_edac.c10
-rw-r--r--drivers/edac/octeon_edac-l2c.c208
-rw-r--r--drivers/edac/octeon_edac-lmc.c186
-rw-r--r--drivers/edac/octeon_edac-pc.c143
-rw-r--r--drivers/edac/octeon_edac-pci.c111
-rw-r--r--drivers/edac/pasemi_edac.c8
-rw-r--r--drivers/edac/ppc4xx_edac.c27
-rw-r--r--drivers/edac/r82600_edac.c8
-rw-r--r--drivers/edac/sb_edac.c7
-rw-r--r--drivers/edac/tile_edac.c8
-rw-r--r--drivers/edac/x38_edac.c7
36 files changed, 802 insertions, 144 deletions
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index bb82d6be793c..66719925970f 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -4,10 +4,13 @@
4# Licensed and distributed under the GPL 4# Licensed and distributed under the GPL
5# 5#
6 6
7config EDAC_SUPPORT
8 bool
9
7menuconfig EDAC 10menuconfig EDAC
8 bool "EDAC (Error Detection And Correction) reporting" 11 bool "EDAC (Error Detection And Correction) reporting"
9 depends on HAS_IOMEM 12 depends on HAS_IOMEM
10 depends on X86 || PPC || TILE || ARM 13 depends on X86 || PPC || TILE || ARM || EDAC_SUPPORT
11 help 14 help
12 EDAC is designed to report errors in the core system. 15 EDAC is designed to report errors in the core system.
13 These are low-level errors that are reported in the CPU or 16 These are low-level errors that are reported in the CPU or
@@ -29,8 +32,6 @@ menuconfig EDAC
29 32
30if EDAC 33if EDAC
31 34
32comment "Reporting subsystems"
33
34config EDAC_LEGACY_SYSFS 35config EDAC_LEGACY_SYSFS
35 bool "EDAC legacy sysfs" 36 bool "EDAC legacy sysfs"
36 default y 37 default y
@@ -316,4 +317,32 @@ config EDAC_HIGHBANK_L2
316 Support for error detection and correction on the 317 Support for error detection and correction on the
317 Calxeda Highbank memory controller. 318 Calxeda Highbank memory controller.
318 319
320config EDAC_OCTEON_PC
321 tristate "Cavium Octeon Primary Caches"
322 depends on EDAC_MM_EDAC && CPU_CAVIUM_OCTEON
323 help
324 Support for error detection and correction on the primary caches of
325 the cnMIPS cores of Cavium Octeon family SOCs.
326
327config EDAC_OCTEON_L2C
328 tristate "Cavium Octeon Secondary Caches (L2C)"
329 depends on EDAC_MM_EDAC && CPU_CAVIUM_OCTEON
330 help
331 Support for error detection and correction on the
332 Cavium Octeon family of SOCs.
333
334config EDAC_OCTEON_LMC
335 tristate "Cavium Octeon DRAM Memory Controller (LMC)"
336 depends on EDAC_MM_EDAC && CPU_CAVIUM_OCTEON
337 help
338 Support for error detection and correction on the
339 Cavium Octeon family of SOCs.
340
341config EDAC_OCTEON_PCI
342 tristate "Cavium Octeon PCI Controller"
343 depends on EDAC_MM_EDAC && PCI && CPU_CAVIUM_OCTEON
344 help
345 Support for error detection and correction on the
346 Cavium Octeon family of SOCs.
347
319endif # EDAC 348endif # EDAC
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile
index 7e5129a733f8..5608a9ba61b7 100644
--- a/drivers/edac/Makefile
+++ b/drivers/edac/Makefile
@@ -58,3 +58,8 @@ obj-$(CONFIG_EDAC_TILE) += tile_edac.o
58 58
59obj-$(CONFIG_EDAC_HIGHBANK_MC) += highbank_mc_edac.o 59obj-$(CONFIG_EDAC_HIGHBANK_MC) += highbank_mc_edac.o
60obj-$(CONFIG_EDAC_HIGHBANK_L2) += highbank_l2_edac.o 60obj-$(CONFIG_EDAC_HIGHBANK_L2) += highbank_l2_edac.o
61
62obj-$(CONFIG_EDAC_OCTEON_PC) += octeon_edac-pc.o
63obj-$(CONFIG_EDAC_OCTEON_L2C) += octeon_edac-l2c.o
64obj-$(CONFIG_EDAC_OCTEON_LMC) += octeon_edac-lmc.o
65obj-$(CONFIG_EDAC_OCTEON_PCI) += octeon_edac-pci.o
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index f74a684269ff..ad8bf2aa629d 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2563,8 +2563,8 @@ err_ret:
2563 return ret; 2563 return ret;
2564} 2564}
2565 2565
2566static int __devinit amd64_probe_one_instance(struct pci_dev *pdev, 2566static int amd64_probe_one_instance(struct pci_dev *pdev,
2567 const struct pci_device_id *mc_type) 2567 const struct pci_device_id *mc_type)
2568{ 2568{
2569 u8 nid = get_node_id(pdev); 2569 u8 nid = get_node_id(pdev);
2570 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; 2570 struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
@@ -2612,7 +2612,7 @@ err_out:
2612 return ret; 2612 return ret;
2613} 2613}
2614 2614
2615static void __devexit amd64_remove_one_instance(struct pci_dev *pdev) 2615static void amd64_remove_one_instance(struct pci_dev *pdev)
2616{ 2616{
2617 struct mem_ctl_info *mci; 2617 struct mem_ctl_info *mci;
2618 struct amd64_pvt *pvt; 2618 struct amd64_pvt *pvt;
@@ -2686,7 +2686,7 @@ MODULE_DEVICE_TABLE(pci, amd64_pci_table);
2686static struct pci_driver amd64_pci_driver = { 2686static struct pci_driver amd64_pci_driver = {
2687 .name = EDAC_MOD_STR, 2687 .name = EDAC_MOD_STR,
2688 .probe = amd64_probe_one_instance, 2688 .probe = amd64_probe_one_instance,
2689 .remove = __devexit_p(amd64_remove_one_instance), 2689 .remove = amd64_remove_one_instance,
2690 .id_table = amd64_pci_table, 2690 .id_table = amd64_pci_table,
2691}; 2691};
2692 2692
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 29eeb68a200c..96e3ee3460a5 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -301,8 +301,8 @@ fail:
301} 301}
302 302
303/* returns count (>= 0), or negative on error */ 303/* returns count (>= 0), or negative on error */
304static int __devinit amd76x_init_one(struct pci_dev *pdev, 304static int amd76x_init_one(struct pci_dev *pdev,
305 const struct pci_device_id *ent) 305 const struct pci_device_id *ent)
306{ 306{
307 edac_dbg(0, "\n"); 307 edac_dbg(0, "\n");
308 308
@@ -318,7 +318,7 @@ static int __devinit amd76x_init_one(struct pci_dev *pdev,
318 * structure for the device then delete the mci and free the 318 * structure for the device then delete the mci and free the
319 * resources. 319 * resources.
320 */ 320 */
321static void __devexit amd76x_remove_one(struct pci_dev *pdev) 321static void amd76x_remove_one(struct pci_dev *pdev)
322{ 322{
323 struct mem_ctl_info *mci; 323 struct mem_ctl_info *mci;
324 324
@@ -350,7 +350,7 @@ MODULE_DEVICE_TABLE(pci, amd76x_pci_tbl);
350static struct pci_driver amd76x_driver = { 350static struct pci_driver amd76x_driver = {
351 .name = EDAC_MOD_STR, 351 .name = EDAC_MOD_STR,
352 .probe = amd76x_init_one, 352 .probe = amd76x_init_one,
353 .remove = __devexit_p(amd76x_remove_one), 353 .remove = amd76x_remove_one,
354 .id_table = amd76x_pci_tbl, 354 .id_table = amd76x_pci_tbl,
355}; 355};
356 356
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c
index a1bbd8edd257..c2eaf334b90b 100644
--- a/drivers/edac/cell_edac.c
+++ b/drivers/edac/cell_edac.c
@@ -124,7 +124,7 @@ static void cell_edac_check(struct mem_ctl_info *mci)
124 } 124 }
125} 125}
126 126
127static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci) 127static void cell_edac_init_csrows(struct mem_ctl_info *mci)
128{ 128{
129 struct csrow_info *csrow = mci->csrows[0]; 129 struct csrow_info *csrow = mci->csrows[0];
130 struct dimm_info *dimm; 130 struct dimm_info *dimm;
@@ -164,7 +164,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
164 } 164 }
165} 165}
166 166
167static int __devinit cell_edac_probe(struct platform_device *pdev) 167static int cell_edac_probe(struct platform_device *pdev)
168{ 168{
169 struct cbe_mic_tm_regs __iomem *regs; 169 struct cbe_mic_tm_regs __iomem *regs;
170 struct mem_ctl_info *mci; 170 struct mem_ctl_info *mci;
@@ -233,7 +233,7 @@ static int __devinit cell_edac_probe(struct platform_device *pdev)
233 return 0; 233 return 0;
234} 234}
235 235
236static int __devexit cell_edac_remove(struct platform_device *pdev) 236static int cell_edac_remove(struct platform_device *pdev)
237{ 237{
238 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); 238 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);
239 if (mci) 239 if (mci)
@@ -247,7 +247,7 @@ static struct platform_driver cell_edac_driver = {
247 .owner = THIS_MODULE, 247 .owner = THIS_MODULE,
248 }, 248 },
249 .probe = cell_edac_probe, 249 .probe = cell_edac_probe,
250 .remove = __devexit_p(cell_edac_remove), 250 .remove = cell_edac_remove,
251}; 251};
252 252
253static int __init cell_edac_init(void) 253static int __init cell_edac_init(void)
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
index c2ef13495873..7f3c57113ba1 100644
--- a/drivers/edac/cpc925_edac.c
+++ b/drivers/edac/cpc925_edac.c
@@ -932,7 +932,7 @@ static int cpc925_mc_get_channels(void __iomem *vbase)
932 return dual; 932 return dual;
933} 933}
934 934
935static int __devinit cpc925_probe(struct platform_device *pdev) 935static int cpc925_probe(struct platform_device *pdev)
936{ 936{
937 static int edac_mc_idx; 937 static int edac_mc_idx;
938 struct mem_ctl_info *mci; 938 struct mem_ctl_info *mci;
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index a5ed6b795fd4..644fec54681f 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1390,8 +1390,7 @@ fail:
1390} 1390}
1391 1391
1392/* returns count (>= 0), or negative on error */ 1392/* returns count (>= 0), or negative on error */
1393static int __devinit e752x_init_one(struct pci_dev *pdev, 1393static int e752x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1394 const struct pci_device_id *ent)
1395{ 1394{
1396 edac_dbg(0, "\n"); 1395 edac_dbg(0, "\n");
1397 1396
@@ -1402,7 +1401,7 @@ static int __devinit e752x_init_one(struct pci_dev *pdev,
1402 return e752x_probe1(pdev, ent->driver_data); 1401 return e752x_probe1(pdev, ent->driver_data);
1403} 1402}
1404 1403
1405static void __devexit e752x_remove_one(struct pci_dev *pdev) 1404static void e752x_remove_one(struct pci_dev *pdev)
1406{ 1405{
1407 struct mem_ctl_info *mci; 1406 struct mem_ctl_info *mci;
1408 struct e752x_pvt *pvt; 1407 struct e752x_pvt *pvt;
@@ -1445,7 +1444,7 @@ MODULE_DEVICE_TABLE(pci, e752x_pci_tbl);
1445static struct pci_driver e752x_driver = { 1444static struct pci_driver e752x_driver = {
1446 .name = EDAC_MOD_STR, 1445 .name = EDAC_MOD_STR,
1447 .probe = e752x_init_one, 1446 .probe = e752x_init_one,
1448 .remove = __devexit_p(e752x_remove_one), 1447 .remove = e752x_remove_one,
1449 .id_table = e752x_pci_tbl, 1448 .id_table = e752x_pci_tbl,
1450}; 1449};
1451 1450
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 9ff57f361a43..1c4056a50383 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -528,8 +528,7 @@ fail0:
528} 528}
529 529
530/* returns count (>= 0), or negative on error */ 530/* returns count (>= 0), or negative on error */
531static int __devinit e7xxx_init_one(struct pci_dev *pdev, 531static int e7xxx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
532 const struct pci_device_id *ent)
533{ 532{
534 edac_dbg(0, "\n"); 533 edac_dbg(0, "\n");
535 534
@@ -538,7 +537,7 @@ static int __devinit e7xxx_init_one(struct pci_dev *pdev,
538 -EIO : e7xxx_probe1(pdev, ent->driver_data); 537 -EIO : e7xxx_probe1(pdev, ent->driver_data);
539} 538}
540 539
541static void __devexit e7xxx_remove_one(struct pci_dev *pdev) 540static void e7xxx_remove_one(struct pci_dev *pdev)
542{ 541{
543 struct mem_ctl_info *mci; 542 struct mem_ctl_info *mci;
544 struct e7xxx_pvt *pvt; 543 struct e7xxx_pvt *pvt;
@@ -579,7 +578,7 @@ MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl);
579static struct pci_driver e7xxx_driver = { 578static struct pci_driver e7xxx_driver = {
580 .name = EDAC_MOD_STR, 579 .name = EDAC_MOD_STR,
581 .probe = e7xxx_init_one, 580 .probe = e7xxx_init_one,
582 .remove = __devexit_p(e7xxx_remove_one), 581 .remove = e7xxx_remove_one,
583 .id_table = e7xxx_pci_tbl, 582 .id_table = e7xxx_pci_tbl,
584}; 583};
585 584
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index a641f623fffd..fb219bc5cb2c 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -340,7 +340,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
340 /* 340 /*
341 * Alocate and fill the csrow/channels structs 341 * Alocate and fill the csrow/channels structs
342 */ 342 */
343 mci->csrows = kcalloc(sizeof(*mci->csrows), tot_csrows, GFP_KERNEL); 343 mci->csrows = kcalloc(tot_csrows, sizeof(*mci->csrows), GFP_KERNEL);
344 if (!mci->csrows) 344 if (!mci->csrows)
345 goto error; 345 goto error;
346 for (row = 0; row < tot_csrows; row++) { 346 for (row = 0; row < tot_csrows; row++) {
@@ -351,7 +351,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
351 csr->csrow_idx = row; 351 csr->csrow_idx = row;
352 csr->mci = mci; 352 csr->mci = mci;
353 csr->nr_channels = tot_channels; 353 csr->nr_channels = tot_channels;
354 csr->channels = kcalloc(sizeof(*csr->channels), tot_channels, 354 csr->channels = kcalloc(tot_channels, sizeof(*csr->channels),
355 GFP_KERNEL); 355 GFP_KERNEL);
356 if (!csr->channels) 356 if (!csr->channels)
357 goto error; 357 goto error;
@@ -369,7 +369,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
369 /* 369 /*
370 * Allocate and fill the dimm structs 370 * Allocate and fill the dimm structs
371 */ 371 */
372 mci->dimms = kcalloc(sizeof(*mci->dimms), tot_dimms, GFP_KERNEL); 372 mci->dimms = kcalloc(tot_dimms, sizeof(*mci->dimms), GFP_KERNEL);
373 if (!mci->dimms) 373 if (!mci->dimms)
374 goto error; 374 goto error;
375 375
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index de2df92f9c77..0ca1ca71157f 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -472,8 +472,7 @@ static void edac_delete_csrow_objects(struct mem_ctl_info *mci)
472 device_remove_file(&csrow->dev, 472 device_remove_file(&csrow->dev,
473 dynamic_csrow_ce_count_attr[chan]); 473 dynamic_csrow_ce_count_attr[chan]);
474 } 474 }
475 put_device(&mci->csrows[i]->dev); 475 device_unregister(&mci->csrows[i]->dev);
476 device_del(&mci->csrows[i]->dev);
477 } 476 }
478} 477}
479#endif 478#endif
@@ -1055,11 +1054,9 @@ fail:
1055 struct dimm_info *dimm = mci->dimms[i]; 1054 struct dimm_info *dimm = mci->dimms[i];
1056 if (dimm->nr_pages == 0) 1055 if (dimm->nr_pages == 0)
1057 continue; 1056 continue;
1058 put_device(&dimm->dev); 1057 device_unregister(&dimm->dev);
1059 device_del(&dimm->dev);
1060 } 1058 }
1061 put_device(&mci->dev); 1059 device_unregister(&mci->dev);
1062 device_del(&mci->dev);
1063 bus_unregister(&mci->bus); 1060 bus_unregister(&mci->bus);
1064 kfree(mci->bus.name); 1061 kfree(mci->bus.name);
1065 return err; 1062 return err;
@@ -1086,16 +1083,14 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
1086 if (dimm->nr_pages == 0) 1083 if (dimm->nr_pages == 0)
1087 continue; 1084 continue;
1088 edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); 1085 edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev));
1089 put_device(&dimm->dev); 1086 device_unregister(&dimm->dev);
1090 device_del(&dimm->dev);
1091 } 1087 }
1092} 1088}
1093 1089
1094void edac_unregister_sysfs(struct mem_ctl_info *mci) 1090void edac_unregister_sysfs(struct mem_ctl_info *mci)
1095{ 1091{
1096 edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); 1092 edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev));
1097 put_device(&mci->dev); 1093 device_unregister(&mci->dev);
1098 device_del(&mci->dev);
1099 bus_unregister(&mci->bus); 1094 bus_unregister(&mci->bus);
1100 kfree(mci->bus.name); 1095 kfree(mci->bus.name);
1101} 1096}
@@ -1159,8 +1154,6 @@ int __init edac_mc_sysfs_init(void)
1159 1154
1160void __exit edac_mc_sysfs_exit(void) 1155void __exit edac_mc_sysfs_exit(void)
1161{ 1156{
1162 put_device(mci_pdev); 1157 device_unregister(mci_pdev);
1163 device_del(mci_pdev);
1164 edac_put_sysfs_subsys(); 1158 edac_put_sysfs_subsys();
1165 kfree(mci_pdev);
1166} 1159}
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index 7684426fafa2..e8658e451762 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -256,7 +256,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
256 struct edac_pci_dev_attribute *edac_pci_dev; 256 struct edac_pci_dev_attribute *edac_pci_dev;
257 edac_pci_dev = (struct edac_pci_dev_attribute *)attr; 257 edac_pci_dev = (struct edac_pci_dev_attribute *)attr;
258 258
259 if (edac_pci_dev->show) 259 if (edac_pci_dev->store)
260 return edac_pci_dev->store(edac_pci_dev->value, buffer, count); 260 return edac_pci_dev->store(edac_pci_dev->value, buffer, count);
261 return -EIO; 261 return -EIO;
262} 262}
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c
index e599b00c05a8..c2bd8c6a4349 100644
--- a/drivers/edac/highbank_l2_edac.c
+++ b/drivers/edac/highbank_l2_edac.c
@@ -50,7 +50,7 @@ static irqreturn_t highbank_l2_err_handler(int irq, void *dev_id)
50 return IRQ_HANDLED; 50 return IRQ_HANDLED;
51} 51}
52 52
53static int __devinit highbank_l2_err_probe(struct platform_device *pdev) 53static int highbank_l2_err_probe(struct platform_device *pdev)
54{ 54{
55 struct edac_device_ctl_info *dci; 55 struct edac_device_ctl_info *dci;
56 struct hb_l2_drvdata *drvdata; 56 struct hb_l2_drvdata *drvdata;
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c
index 7ea4cc2e8bd2..4695dd2d71fd 100644
--- a/drivers/edac/highbank_mc_edac.c
+++ b/drivers/edac/highbank_mc_edac.c
@@ -119,7 +119,7 @@ static const struct file_operations highbank_mc_debug_inject_fops = {
119 .llseek = generic_file_llseek, 119 .llseek = generic_file_llseek,
120}; 120};
121 121
122static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) 122static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
123{ 123{
124 if (mci->debugfs) 124 if (mci->debugfs)
125 debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, 125 debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci,
@@ -127,11 +127,11 @@ static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
127; 127;
128} 128}
129#else 129#else
130static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) 130static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
131{} 131{}
132#endif 132#endif
133 133
134static int __devinit highbank_mc_probe(struct platform_device *pdev) 134static int highbank_mc_probe(struct platform_device *pdev)
135{ 135{
136 struct edac_mc_layer layers[2]; 136 struct edac_mc_layer layers[2];
137 struct mem_ctl_info *mci; 137 struct mem_ctl_info *mci;
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index d3d19cc4e9a1..694efcbf19c0 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -455,8 +455,7 @@ fail:
455} 455}
456 456
457/* returns count (>= 0), or negative on error */ 457/* returns count (>= 0), or negative on error */
458static int __devinit i3000_init_one(struct pci_dev *pdev, 458static int i3000_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
459 const struct pci_device_id *ent)
460{ 459{
461 int rc; 460 int rc;
462 461
@@ -472,7 +471,7 @@ static int __devinit i3000_init_one(struct pci_dev *pdev,
472 return rc; 471 return rc;
473} 472}
474 473
475static void __devexit i3000_remove_one(struct pci_dev *pdev) 474static void i3000_remove_one(struct pci_dev *pdev)
476{ 475{
477 struct mem_ctl_info *mci; 476 struct mem_ctl_info *mci;
478 477
@@ -502,7 +501,7 @@ MODULE_DEVICE_TABLE(pci, i3000_pci_tbl);
502static struct pci_driver i3000_driver = { 501static struct pci_driver i3000_driver = {
503 .name = EDAC_MOD_STR, 502 .name = EDAC_MOD_STR,
504 .probe = i3000_init_one, 503 .probe = i3000_init_one,
505 .remove = __devexit_p(i3000_remove_one), 504 .remove = i3000_remove_one,
506 .id_table = i3000_pci_tbl, 505 .id_table = i3000_pci_tbl,
507}; 506};
508 507
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index b6653a6fc5d5..4e8337602e78 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -419,8 +419,7 @@ fail:
419 return rc; 419 return rc;
420} 420}
421 421
422static int __devinit i3200_init_one(struct pci_dev *pdev, 422static int i3200_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
423 const struct pci_device_id *ent)
424{ 423{
425 int rc; 424 int rc;
426 425
@@ -436,7 +435,7 @@ static int __devinit i3200_init_one(struct pci_dev *pdev,
436 return rc; 435 return rc;
437} 436}
438 437
439static void __devexit i3200_remove_one(struct pci_dev *pdev) 438static void i3200_remove_one(struct pci_dev *pdev)
440{ 439{
441 struct mem_ctl_info *mci; 440 struct mem_ctl_info *mci;
442 struct i3200_priv *priv; 441 struct i3200_priv *priv;
@@ -467,7 +466,7 @@ MODULE_DEVICE_TABLE(pci, i3200_pci_tbl);
467static struct pci_driver i3200_driver = { 466static struct pci_driver i3200_driver = {
468 .name = EDAC_MOD_STR, 467 .name = EDAC_MOD_STR,
469 .probe = i3200_init_one, 468 .probe = i3200_init_one,
470 .remove = __devexit_p(i3200_remove_one), 469 .remove = i3200_remove_one,
471 .id_table = i3200_pci_tbl, 470 .id_table = i3200_pci_tbl,
472}; 471};
473 472
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 6a49dd00b81b..63b2194e8c20 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -1489,8 +1489,7 @@ fail0:
1489 * negative on error 1489 * negative on error
1490 * count (>= 0) 1490 * count (>= 0)
1491 */ 1491 */
1492static int __devinit i5000_init_one(struct pci_dev *pdev, 1492static int i5000_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1493 const struct pci_device_id *id)
1494{ 1493{
1495 int rc; 1494 int rc;
1496 1495
@@ -1509,7 +1508,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev,
1509 * i5000_remove_one destructor for one instance of device 1508 * i5000_remove_one destructor for one instance of device
1510 * 1509 *
1511 */ 1510 */
1512static void __devexit i5000_remove_one(struct pci_dev *pdev) 1511static void i5000_remove_one(struct pci_dev *pdev)
1513{ 1512{
1514 struct mem_ctl_info *mci; 1513 struct mem_ctl_info *mci;
1515 1514
@@ -1547,7 +1546,7 @@ MODULE_DEVICE_TABLE(pci, i5000_pci_tbl);
1547static struct pci_driver i5000_driver = { 1546static struct pci_driver i5000_driver = {
1548 .name = KBUILD_BASENAME, 1547 .name = KBUILD_BASENAME,
1549 .probe = i5000_init_one, 1548 .probe = i5000_init_one,
1550 .remove = __devexit_p(i5000_remove_one), 1549 .remove = i5000_remove_one,
1551 .id_table = i5000_pci_tbl, 1550 .id_table = i5000_pci_tbl,
1552}; 1551};
1553 1552
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index c4b5e5f868e8..d6955b2cc99f 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -638,8 +638,7 @@ static struct pci_dev *pci_get_device_func(unsigned vendor,
638 return ret; 638 return ret;
639} 639}
640 640
641static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci, 641static unsigned long i5100_npages(struct mem_ctl_info *mci, int csrow)
642 int csrow)
643{ 642{
644 struct i5100_priv *priv = mci->pvt_info; 643 struct i5100_priv *priv = mci->pvt_info;
645 const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow); 644 const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow);
@@ -660,7 +659,7 @@ static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci,
660 ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE); 659 ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE);
661} 660}
662 661
663static void __devinit i5100_init_mtr(struct mem_ctl_info *mci) 662static void i5100_init_mtr(struct mem_ctl_info *mci)
664{ 663{
665 struct i5100_priv *priv = mci->pvt_info; 664 struct i5100_priv *priv = mci->pvt_info;
666 struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm }; 665 struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm };
@@ -732,7 +731,7 @@ static int i5100_read_spd_byte(const struct mem_ctl_info *mci,
732 * o not the only way to may chip selects to dimm slots 731 * o not the only way to may chip selects to dimm slots
733 * o investigate if there is some way to obtain this map from the bios 732 * o investigate if there is some way to obtain this map from the bios
734 */ 733 */
735static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci) 734static void i5100_init_dimm_csmap(struct mem_ctl_info *mci)
736{ 735{
737 struct i5100_priv *priv = mci->pvt_info; 736 struct i5100_priv *priv = mci->pvt_info;
738 int i; 737 int i;
@@ -762,8 +761,8 @@ static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci)
762 } 761 }
763} 762}
764 763
765static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev, 764static void i5100_init_dimm_layout(struct pci_dev *pdev,
766 struct mem_ctl_info *mci) 765 struct mem_ctl_info *mci)
767{ 766{
768 struct i5100_priv *priv = mci->pvt_info; 767 struct i5100_priv *priv = mci->pvt_info;
769 int i; 768 int i;
@@ -784,8 +783,8 @@ static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev,
784 i5100_init_dimm_csmap(mci); 783 i5100_init_dimm_csmap(mci);
785} 784}
786 785
787static void __devinit i5100_init_interleaving(struct pci_dev *pdev, 786static void i5100_init_interleaving(struct pci_dev *pdev,
788 struct mem_ctl_info *mci) 787 struct mem_ctl_info *mci)
789{ 788{
790 u16 w; 789 u16 w;
791 u32 dw; 790 u32 dw;
@@ -830,7 +829,7 @@ static void __devinit i5100_init_interleaving(struct pci_dev *pdev,
830 i5100_init_mtr(mci); 829 i5100_init_mtr(mci);
831} 830}
832 831
833static void __devinit i5100_init_csrows(struct mem_ctl_info *mci) 832static void i5100_init_csrows(struct mem_ctl_info *mci)
834{ 833{
835 int i; 834 int i;
836 struct i5100_priv *priv = mci->pvt_info; 835 struct i5100_priv *priv = mci->pvt_info;
@@ -864,8 +863,7 @@ static void __devinit i5100_init_csrows(struct mem_ctl_info *mci)
864 } 863 }
865} 864}
866 865
867static int __devinit i5100_init_one(struct pci_dev *pdev, 866static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
868 const struct pci_device_id *id)
869{ 867{
870 int rc; 868 int rc;
871 struct mem_ctl_info *mci; 869 struct mem_ctl_info *mci;
@@ -1020,7 +1018,7 @@ bail:
1020 return ret; 1018 return ret;
1021} 1019}
1022 1020
1023static void __devexit i5100_remove_one(struct pci_dev *pdev) 1021static void i5100_remove_one(struct pci_dev *pdev)
1024{ 1022{
1025 struct mem_ctl_info *mci; 1023 struct mem_ctl_info *mci;
1026 struct i5100_priv *priv; 1024 struct i5100_priv *priv;
@@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(pci, i5100_pci_tbl);
1054static struct pci_driver i5100_driver = { 1052static struct pci_driver i5100_driver = {
1055 .name = KBUILD_BASENAME, 1053 .name = KBUILD_BASENAME,
1056 .probe = i5100_init_one, 1054 .probe = i5100_init_one,
1057 .remove = __devexit_p(i5100_remove_one), 1055 .remove = i5100_remove_one,
1058 .id_table = i5100_pci_tbl, 1056 .id_table = i5100_pci_tbl,
1059}; 1057};
1060 1058
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index 277246998b80..0a05bbceb08f 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -1373,8 +1373,7 @@ fail0:
1373 * negative on error 1373 * negative on error
1374 * count (>= 0) 1374 * count (>= 0)
1375 */ 1375 */
1376static int __devinit i5400_init_one(struct pci_dev *pdev, 1376static int i5400_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1377 const struct pci_device_id *id)
1378{ 1377{
1379 int rc; 1378 int rc;
1380 1379
@@ -1393,7 +1392,7 @@ static int __devinit i5400_init_one(struct pci_dev *pdev,
1393 * i5400_remove_one destructor for one instance of device 1392 * i5400_remove_one destructor for one instance of device
1394 * 1393 *
1395 */ 1394 */
1396static void __devexit i5400_remove_one(struct pci_dev *pdev) 1395static void i5400_remove_one(struct pci_dev *pdev)
1397{ 1396{
1398 struct mem_ctl_info *mci; 1397 struct mem_ctl_info *mci;
1399 1398
@@ -1431,7 +1430,7 @@ MODULE_DEVICE_TABLE(pci, i5400_pci_tbl);
1431static struct pci_driver i5400_driver = { 1430static struct pci_driver i5400_driver = {
1432 .name = "i5400_edac", 1431 .name = "i5400_edac",
1433 .probe = i5400_init_one, 1432 .probe = i5400_init_one,
1434 .remove = __devexit_p(i5400_remove_one), 1433 .remove = i5400_remove_one,
1435 .id_table = i5400_pci_tbl, 1434 .id_table = i5400_pci_tbl,
1436}; 1435};
1437 1436
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index 9d669cd43618..087c27bc5d42 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -923,7 +923,7 @@ static void i7300_put_devices(struct mem_ctl_info *mci)
923 * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0 923 * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0
924 * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1 924 * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1
925 */ 925 */
926static int __devinit i7300_get_devices(struct mem_ctl_info *mci) 926static int i7300_get_devices(struct mem_ctl_info *mci)
927{ 927{
928 struct i7300_pvt *pvt; 928 struct i7300_pvt *pvt;
929 struct pci_dev *pdev; 929 struct pci_dev *pdev;
@@ -1008,8 +1008,7 @@ error:
1008 * @pdev: struct pci_dev pointer 1008 * @pdev: struct pci_dev pointer
1009 * @id: struct pci_device_id pointer - currently unused 1009 * @id: struct pci_device_id pointer - currently unused
1010 */ 1010 */
1011static int __devinit i7300_init_one(struct pci_dev *pdev, 1011static int i7300_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1012 const struct pci_device_id *id)
1013{ 1012{
1014 struct mem_ctl_info *mci; 1013 struct mem_ctl_info *mci;
1015 struct edac_mc_layer layers[3]; 1014 struct edac_mc_layer layers[3];
@@ -1122,7 +1121,7 @@ fail0:
1122 * i7300_remove_one() - Remove the driver 1121 * i7300_remove_one() - Remove the driver
1123 * @pdev: struct pci_dev pointer 1122 * @pdev: struct pci_dev pointer
1124 */ 1123 */
1125static void __devexit i7300_remove_one(struct pci_dev *pdev) 1124static void i7300_remove_one(struct pci_dev *pdev)
1126{ 1125{
1127 struct mem_ctl_info *mci; 1126 struct mem_ctl_info *mci;
1128 char *tmp; 1127 char *tmp;
@@ -1163,7 +1162,7 @@ MODULE_DEVICE_TABLE(pci, i7300_pci_tbl);
1163static struct pci_driver i7300_driver = { 1162static struct pci_driver i7300_driver = {
1164 .name = "i7300_edac", 1163 .name = "i7300_edac",
1165 .probe = i7300_init_one, 1164 .probe = i7300_init_one,
1166 .remove = __devexit_p(i7300_remove_one), 1165 .remove = i7300_remove_one,
1167 .id_table = i7300_pci_tbl, 1166 .id_table = i7300_pci_tbl,
1168}; 1167};
1169 1168
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index ad5f934c95d3..0ec3e95a12cd 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2305,8 +2305,7 @@ fail0:
2305 * < 0 for error code 2305 * < 0 for error code
2306 */ 2306 */
2307 2307
2308static int __devinit i7core_probe(struct pci_dev *pdev, 2308static int i7core_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2309 const struct pci_device_id *id)
2310{ 2309{
2311 int rc, count = 0; 2310 int rc, count = 0;
2312 struct i7core_dev *i7core_dev; 2311 struct i7core_dev *i7core_dev;
@@ -2368,7 +2367,7 @@ fail0:
2368 * i7core_remove destructor for one instance of device 2367 * i7core_remove destructor for one instance of device
2369 * 2368 *
2370 */ 2369 */
2371static void __devexit i7core_remove(struct pci_dev *pdev) 2370static void i7core_remove(struct pci_dev *pdev)
2372{ 2371{
2373 struct i7core_dev *i7core_dev; 2372 struct i7core_dev *i7core_dev;
2374 2373
@@ -2409,7 +2408,7 @@ MODULE_DEVICE_TABLE(pci, i7core_pci_tbl);
2409static struct pci_driver i7core_driver = { 2408static struct pci_driver i7core_driver = {
2410 .name = "i7core_edac", 2409 .name = "i7core_edac",
2411 .probe = i7core_probe, 2410 .probe = i7core_probe,
2412 .remove = __devexit_p(i7core_remove), 2411 .remove = i7core_remove,
2413 .id_table = i7core_pci_tbl, 2412 .id_table = i7core_pci_tbl,
2414}; 2413};
2415 2414
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
index 90f303db5d1d..57fdb77903ba 100644
--- a/drivers/edac/i82443bxgx_edac.c
+++ b/drivers/edac/i82443bxgx_edac.c
@@ -353,8 +353,8 @@ fail:
353EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1); 353EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1);
354 354
355/* returns count (>= 0), or negative on error */ 355/* returns count (>= 0), or negative on error */
356static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev, 356static int i82443bxgx_edacmc_init_one(struct pci_dev *pdev,
357 const struct pci_device_id *ent) 357 const struct pci_device_id *ent)
358{ 358{
359 int rc; 359 int rc;
360 360
@@ -369,7 +369,7 @@ static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev,
369 return rc; 369 return rc;
370} 370}
371 371
372static void __devexit i82443bxgx_edacmc_remove_one(struct pci_dev *pdev) 372static void i82443bxgx_edacmc_remove_one(struct pci_dev *pdev)
373{ 373{
374 struct mem_ctl_info *mci; 374 struct mem_ctl_info *mci;
375 375
@@ -399,7 +399,7 @@ MODULE_DEVICE_TABLE(pci, i82443bxgx_pci_tbl);
399static struct pci_driver i82443bxgx_edacmc_driver = { 399static struct pci_driver i82443bxgx_edacmc_driver = {
400 .name = EDAC_MOD_STR, 400 .name = EDAC_MOD_STR,
401 .probe = i82443bxgx_edacmc_init_one, 401 .probe = i82443bxgx_edacmc_init_one,
402 .remove = __devexit_p(i82443bxgx_edacmc_remove_one), 402 .remove = i82443bxgx_edacmc_remove_one,
403 .id_table = i82443bxgx_pci_tbl, 403 .id_table = i82443bxgx_pci_tbl,
404}; 404};
405 405
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index 1faa74971513..3e3e431c8301 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -254,8 +254,8 @@ fail:
254} 254}
255 255
256/* returns count (>= 0), or negative on error */ 256/* returns count (>= 0), or negative on error */
257static int __devinit i82860_init_one(struct pci_dev *pdev, 257static int i82860_init_one(struct pci_dev *pdev,
258 const struct pci_device_id *ent) 258 const struct pci_device_id *ent)
259{ 259{
260 int rc; 260 int rc;
261 261
@@ -273,7 +273,7 @@ static int __devinit i82860_init_one(struct pci_dev *pdev,
273 return rc; 273 return rc;
274} 274}
275 275
276static void __devexit i82860_remove_one(struct pci_dev *pdev) 276static void i82860_remove_one(struct pci_dev *pdev)
277{ 277{
278 struct mem_ctl_info *mci; 278 struct mem_ctl_info *mci;
279 279
@@ -302,7 +302,7 @@ MODULE_DEVICE_TABLE(pci, i82860_pci_tbl);
302static struct pci_driver i82860_driver = { 302static struct pci_driver i82860_driver = {
303 .name = EDAC_MOD_STR, 303 .name = EDAC_MOD_STR,
304 .probe = i82860_init_one, 304 .probe = i82860_init_one,
305 .remove = __devexit_p(i82860_remove_one), 305 .remove = i82860_remove_one,
306 .id_table = i82860_pci_tbl, 306 .id_table = i82860_pci_tbl,
307}; 307};
308 308
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 3e416b1a6b53..2f8535fc451e 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -479,8 +479,8 @@ fail0:
479} 479}
480 480
481/* returns count (>= 0), or negative on error */ 481/* returns count (>= 0), or negative on error */
482static int __devinit i82875p_init_one(struct pci_dev *pdev, 482static int i82875p_init_one(struct pci_dev *pdev,
483 const struct pci_device_id *ent) 483 const struct pci_device_id *ent)
484{ 484{
485 int rc; 485 int rc;
486 486
@@ -498,7 +498,7 @@ static int __devinit i82875p_init_one(struct pci_dev *pdev,
498 return rc; 498 return rc;
499} 499}
500 500
501static void __devexit i82875p_remove_one(struct pci_dev *pdev) 501static void i82875p_remove_one(struct pci_dev *pdev)
502{ 502{
503 struct mem_ctl_info *mci; 503 struct mem_ctl_info *mci;
504 struct i82875p_pvt *pvt = NULL; 504 struct i82875p_pvt *pvt = NULL;
@@ -541,7 +541,7 @@ MODULE_DEVICE_TABLE(pci, i82875p_pci_tbl);
541static struct pci_driver i82875p_driver = { 541static struct pci_driver i82875p_driver = {
542 .name = EDAC_MOD_STR, 542 .name = EDAC_MOD_STR,
543 .probe = i82875p_init_one, 543 .probe = i82875p_init_one,
544 .remove = __devexit_p(i82875p_remove_one), 544 .remove = i82875p_remove_one,
545 .id_table = i82875p_pci_tbl, 545 .id_table = i82875p_pci_tbl,
546}; 546};
547 547
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
index a98020409fa9..0c8d4b0eaa32 100644
--- a/drivers/edac/i82975x_edac.c
+++ b/drivers/edac/i82975x_edac.c
@@ -592,8 +592,8 @@ fail0:
592} 592}
593 593
594/* returns count (>= 0), or negative on error */ 594/* returns count (>= 0), or negative on error */
595static int __devinit i82975x_init_one(struct pci_dev *pdev, 595static int i82975x_init_one(struct pci_dev *pdev,
596 const struct pci_device_id *ent) 596 const struct pci_device_id *ent)
597{ 597{
598 int rc; 598 int rc;
599 599
@@ -610,7 +610,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev,
610 return rc; 610 return rc;
611} 611}
612 612
613static void __devexit i82975x_remove_one(struct pci_dev *pdev) 613static void i82975x_remove_one(struct pci_dev *pdev)
614{ 614{
615 struct mem_ctl_info *mci; 615 struct mem_ctl_info *mci;
616 struct i82975x_pvt *pvt; 616 struct i82975x_pvt *pvt;
@@ -643,7 +643,7 @@ MODULE_DEVICE_TABLE(pci, i82975x_pci_tbl);
643static struct pci_driver i82975x_driver = { 643static struct pci_driver i82975x_driver = {
644 .name = EDAC_MOD_STR, 644 .name = EDAC_MOD_STR,
645 .probe = i82975x_init_one, 645 .probe = i82975x_init_one,
646 .remove = __devexit_p(i82975x_remove_one), 646 .remove = i82975x_remove_one,
647 .id_table = i82975x_pci_tbl, 647 .id_table = i82975x_pci_tbl,
648}; 648};
649 649
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 4fe66fa183ec..42a840d530a5 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -212,7 +212,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
212 return IRQ_HANDLED; 212 return IRQ_HANDLED;
213} 213}
214 214
215int __devinit mpc85xx_pci_err_probe(struct platform_device *op) 215int mpc85xx_pci_err_probe(struct platform_device *op)
216{ 216{
217 struct edac_pci_ctl_info *pci; 217 struct edac_pci_ctl_info *pci;
218 struct mpc85xx_pci_pdata *pdata; 218 struct mpc85xx_pci_pdata *pdata;
@@ -504,7 +504,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
504 return IRQ_HANDLED; 504 return IRQ_HANDLED;
505} 505}
506 506
507static int __devinit mpc85xx_l2_err_probe(struct platform_device *op) 507static int mpc85xx_l2_err_probe(struct platform_device *op)
508{ 508{
509 struct edac_device_ctl_info *edac_dev; 509 struct edac_device_ctl_info *edac_dev;
510 struct mpc85xx_l2_pdata *pdata; 510 struct mpc85xx_l2_pdata *pdata;
@@ -885,7 +885,7 @@ static irqreturn_t mpc85xx_mc_isr(int irq, void *dev_id)
885 return IRQ_HANDLED; 885 return IRQ_HANDLED;
886} 886}
887 887
888static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci) 888static void mpc85xx_init_csrows(struct mem_ctl_info *mci)
889{ 889{
890 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 890 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
891 struct csrow_info *csrow; 891 struct csrow_info *csrow;
@@ -964,7 +964,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
964 } 964 }
965} 965}
966 966
967static int __devinit mpc85xx_mc_err_probe(struct platform_device *op) 967static int mpc85xx_mc_err_probe(struct platform_device *op)
968{ 968{
969 struct mem_ctl_info *mci; 969 struct mem_ctl_info *mci;
970 struct edac_mc_layer layers[2]; 970 struct edac_mc_layer layers[2];
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 2b315c2edc3c..542fad70e360 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -100,7 +100,7 @@ static int __init mv64x60_pci_fixup(struct platform_device *pdev)
100 return 0; 100 return 0;
101} 101}
102 102
103static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) 103static int mv64x60_pci_err_probe(struct platform_device *pdev)
104{ 104{
105 struct edac_pci_ctl_info *pci; 105 struct edac_pci_ctl_info *pci;
106 struct mv64x60_pci_pdata *pdata; 106 struct mv64x60_pci_pdata *pdata;
@@ -221,7 +221,7 @@ static int mv64x60_pci_err_remove(struct platform_device *pdev)
221 221
222static struct platform_driver mv64x60_pci_err_driver = { 222static struct platform_driver mv64x60_pci_err_driver = {
223 .probe = mv64x60_pci_err_probe, 223 .probe = mv64x60_pci_err_probe,
224 .remove = __devexit_p(mv64x60_pci_err_remove), 224 .remove = mv64x60_pci_err_remove,
225 .driver = { 225 .driver = {
226 .name = "mv64x60_pci_err", 226 .name = "mv64x60_pci_err",
227 } 227 }
@@ -271,7 +271,7 @@ static irqreturn_t mv64x60_sram_isr(int irq, void *dev_id)
271 return IRQ_HANDLED; 271 return IRQ_HANDLED;
272} 272}
273 273
274static int __devinit mv64x60_sram_err_probe(struct platform_device *pdev) 274static int mv64x60_sram_err_probe(struct platform_device *pdev)
275{ 275{
276 struct edac_device_ctl_info *edac_dev; 276 struct edac_device_ctl_info *edac_dev;
277 struct mv64x60_sram_pdata *pdata; 277 struct mv64x60_sram_pdata *pdata;
@@ -439,7 +439,7 @@ static irqreturn_t mv64x60_cpu_isr(int irq, void *dev_id)
439 return IRQ_HANDLED; 439 return IRQ_HANDLED;
440} 440}
441 441
442static int __devinit mv64x60_cpu_err_probe(struct platform_device *pdev) 442static int mv64x60_cpu_err_probe(struct platform_device *pdev)
443{ 443{
444 struct edac_device_ctl_info *edac_dev; 444 struct edac_device_ctl_info *edac_dev;
445 struct resource *r; 445 struct resource *r;
@@ -697,7 +697,7 @@ static void mv64x60_init_csrows(struct mem_ctl_info *mci,
697 dimm->edac_mode = EDAC_SECDED; 697 dimm->edac_mode = EDAC_SECDED;
698} 698}
699 699
700static int __devinit mv64x60_mc_err_probe(struct platform_device *pdev) 700static int mv64x60_mc_err_probe(struct platform_device *pdev)
701{ 701{
702 struct mem_ctl_info *mci; 702 struct mem_ctl_info *mci;
703 struct edac_mc_layer layers[2]; 703 struct edac_mc_layer layers[2];
diff --git a/drivers/edac/octeon_edac-l2c.c b/drivers/edac/octeon_edac-l2c.c
new file mode 100644
index 000000000000..7e98084d3645
--- /dev/null
+++ b/drivers/edac/octeon_edac-l2c.c
@@ -0,0 +1,208 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2012 Cavium, Inc.
7 *
8 * Copyright (C) 2009 Wind River Systems,
9 * written by Ralf Baechle <ralf@linux-mips.org>
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/slab.h>
14#include <linux/io.h>
15#include <linux/edac.h>
16
17#include <asm/octeon/cvmx.h>
18
19#include "edac_core.h"
20#include "edac_module.h"
21
22#define EDAC_MOD_STR "octeon-l2c"
23
24static void octeon_l2c_poll_oct1(struct edac_device_ctl_info *l2c)
25{
26 union cvmx_l2t_err l2t_err, l2t_err_reset;
27 union cvmx_l2d_err l2d_err, l2d_err_reset;
28
29 l2t_err_reset.u64 = 0;
30 l2t_err.u64 = cvmx_read_csr(CVMX_L2T_ERR);
31 if (l2t_err.s.sec_err) {
32 edac_device_handle_ce(l2c, 0, 0,
33 "Tag Single bit error (corrected)");
34 l2t_err_reset.s.sec_err = 1;
35 }
36 if (l2t_err.s.ded_err) {
37 edac_device_handle_ue(l2c, 0, 0,
38 "Tag Double bit error (detected)");
39 l2t_err_reset.s.ded_err = 1;
40 }
41 if (l2t_err_reset.u64)
42 cvmx_write_csr(CVMX_L2T_ERR, l2t_err_reset.u64);
43
44 l2d_err_reset.u64 = 0;
45 l2d_err.u64 = cvmx_read_csr(CVMX_L2D_ERR);
46 if (l2d_err.s.sec_err) {
47 edac_device_handle_ce(l2c, 0, 1,
48 "Data Single bit error (corrected)");
49 l2d_err_reset.s.sec_err = 1;
50 }
51 if (l2d_err.s.ded_err) {
52 edac_device_handle_ue(l2c, 0, 1,
53 "Data Double bit error (detected)");
54 l2d_err_reset.s.ded_err = 1;
55 }
56 if (l2d_err_reset.u64)
57 cvmx_write_csr(CVMX_L2D_ERR, l2d_err_reset.u64);
58
59}
60
61static void _octeon_l2c_poll_oct2(struct edac_device_ctl_info *l2c, int tad)
62{
63 union cvmx_l2c_err_tdtx err_tdtx, err_tdtx_reset;
64 union cvmx_l2c_err_ttgx err_ttgx, err_ttgx_reset;
65 char buf1[64];
66 char buf2[80];
67
68 err_tdtx_reset.u64 = 0;
69 err_tdtx.u64 = cvmx_read_csr(CVMX_L2C_ERR_TDTX(tad));
70 if (err_tdtx.s.dbe || err_tdtx.s.sbe ||
71 err_tdtx.s.vdbe || err_tdtx.s.vsbe)
72 snprintf(buf1, sizeof(buf1),
73 "type:%d, syn:0x%x, way:%d",
74 err_tdtx.s.type, err_tdtx.s.syn, err_tdtx.s.wayidx);
75
76 if (err_tdtx.s.dbe) {
77 snprintf(buf2, sizeof(buf2),
78 "L2D Double bit error (detected):%s", buf1);
79 err_tdtx_reset.s.dbe = 1;
80 edac_device_handle_ue(l2c, tad, 1, buf2);
81 }
82 if (err_tdtx.s.sbe) {
83 snprintf(buf2, sizeof(buf2),
84 "L2D Single bit error (corrected):%s", buf1);
85 err_tdtx_reset.s.sbe = 1;
86 edac_device_handle_ce(l2c, tad, 1, buf2);
87 }
88 if (err_tdtx.s.vdbe) {
89 snprintf(buf2, sizeof(buf2),
90 "VBF Double bit error (detected):%s", buf1);
91 err_tdtx_reset.s.vdbe = 1;
92 edac_device_handle_ue(l2c, tad, 1, buf2);
93 }
94 if (err_tdtx.s.vsbe) {
95 snprintf(buf2, sizeof(buf2),
96 "VBF Single bit error (corrected):%s", buf1);
97 err_tdtx_reset.s.vsbe = 1;
98 edac_device_handle_ce(l2c, tad, 1, buf2);
99 }
100 if (err_tdtx_reset.u64)
101 cvmx_write_csr(CVMX_L2C_ERR_TDTX(tad), err_tdtx_reset.u64);
102
103 err_ttgx_reset.u64 = 0;
104 err_ttgx.u64 = cvmx_read_csr(CVMX_L2C_ERR_TTGX(tad));
105
106 if (err_ttgx.s.dbe || err_ttgx.s.sbe)
107 snprintf(buf1, sizeof(buf1),
108 "type:%d, syn:0x%x, way:%d",
109 err_ttgx.s.type, err_ttgx.s.syn, err_ttgx.s.wayidx);
110
111 if (err_ttgx.s.dbe) {
112 snprintf(buf2, sizeof(buf2),
113 "Tag Double bit error (detected):%s", buf1);
114 err_ttgx_reset.s.dbe = 1;
115 edac_device_handle_ue(l2c, tad, 0, buf2);
116 }
117 if (err_ttgx.s.sbe) {
118 snprintf(buf2, sizeof(buf2),
119 "Tag Single bit error (corrected):%s", buf1);
120 err_ttgx_reset.s.sbe = 1;
121 edac_device_handle_ce(l2c, tad, 0, buf2);
122 }
123 if (err_ttgx_reset.u64)
124 cvmx_write_csr(CVMX_L2C_ERR_TTGX(tad), err_ttgx_reset.u64);
125}
126
127static void octeon_l2c_poll_oct2(struct edac_device_ctl_info *l2c)
128{
129 int i;
130 for (i = 0; i < l2c->nr_instances; i++)
131 _octeon_l2c_poll_oct2(l2c, i);
132}
133
134static int octeon_l2c_probe(struct platform_device *pdev)
135{
136 struct edac_device_ctl_info *l2c;
137
138 int num_tads = OCTEON_IS_MODEL(OCTEON_CN68XX) ? 4 : 1;
139
140 /* 'Tags' are block 0, 'Data' is block 1*/
141 l2c = edac_device_alloc_ctl_info(0, "l2c", num_tads, "l2c", 2, 0,
142 NULL, 0, edac_device_alloc_index());
143 if (!l2c)
144 return -ENOMEM;
145
146 l2c->dev = &pdev->dev;
147 platform_set_drvdata(pdev, l2c);
148 l2c->dev_name = dev_name(&pdev->dev);
149
150 l2c->mod_name = "octeon-l2c";
151 l2c->ctl_name = "octeon_l2c_err";
152
153
154 if (OCTEON_IS_MODEL(OCTEON_FAM_1_PLUS)) {
155 union cvmx_l2t_err l2t_err;
156 union cvmx_l2d_err l2d_err;
157
158 l2t_err.u64 = cvmx_read_csr(CVMX_L2T_ERR);
159 l2t_err.s.sec_intena = 0; /* We poll */
160 l2t_err.s.ded_intena = 0;
161 cvmx_write_csr(CVMX_L2T_ERR, l2t_err.u64);
162
163 l2d_err.u64 = cvmx_read_csr(CVMX_L2D_ERR);
164 l2d_err.s.sec_intena = 0; /* We poll */
165 l2d_err.s.ded_intena = 0;
166 cvmx_write_csr(CVMX_L2T_ERR, l2d_err.u64);
167
168 l2c->edac_check = octeon_l2c_poll_oct1;
169 } else {
170 /* OCTEON II */
171 l2c->edac_check = octeon_l2c_poll_oct2;
172 }
173
174 if (edac_device_add_device(l2c) > 0) {
175 pr_err("%s: edac_device_add_device() failed\n", __func__);
176 goto err;
177 }
178
179
180 return 0;
181
182err:
183 edac_device_free_ctl_info(l2c);
184
185 return -ENXIO;
186}
187
188static int octeon_l2c_remove(struct platform_device *pdev)
189{
190 struct edac_device_ctl_info *l2c = platform_get_drvdata(pdev);
191
192 edac_device_del_device(&pdev->dev);
193 edac_device_free_ctl_info(l2c);
194
195 return 0;
196}
197
198static struct platform_driver octeon_l2c_driver = {
199 .probe = octeon_l2c_probe,
200 .remove = octeon_l2c_remove,
201 .driver = {
202 .name = "octeon_l2c_edac",
203 }
204};
205module_platform_driver(octeon_l2c_driver);
206
207MODULE_LICENSE("GPL");
208MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
diff --git a/drivers/edac/octeon_edac-lmc.c b/drivers/edac/octeon_edac-lmc.c
new file mode 100644
index 000000000000..93412d6b3af1
--- /dev/null
+++ b/drivers/edac/octeon_edac-lmc.c
@@ -0,0 +1,186 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2009 Wind River Systems,
7 * written by Ralf Baechle <ralf@linux-mips.org>
8 */
9#include <linux/module.h>
10#include <linux/init.h>
11#include <linux/slab.h>
12#include <linux/io.h>
13#include <linux/edac.h>
14
15#include <asm/octeon/octeon.h>
16#include <asm/octeon/cvmx-lmcx-defs.h>
17
18#include "edac_core.h"
19#include "edac_module.h"
20
21#define OCTEON_MAX_MC 4
22
23static void octeon_lmc_edac_poll(struct mem_ctl_info *mci)
24{
25 union cvmx_lmcx_mem_cfg0 cfg0;
26 bool do_clear = false;
27 char msg[64];
28
29 cfg0.u64 = cvmx_read_csr(CVMX_LMCX_MEM_CFG0(mci->mc_idx));
30 if (cfg0.s.sec_err || cfg0.s.ded_err) {
31 union cvmx_lmcx_fadr fadr;
32 fadr.u64 = cvmx_read_csr(CVMX_LMCX_FADR(mci->mc_idx));
33 snprintf(msg, sizeof(msg),
34 "DIMM %d rank %d bank %d row %d col %d",
35 fadr.cn30xx.fdimm, fadr.cn30xx.fbunk,
36 fadr.cn30xx.fbank, fadr.cn30xx.frow, fadr.cn30xx.fcol);
37 }
38
39 if (cfg0.s.sec_err) {
40 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0,
41 -1, -1, -1, msg, "");
42 cfg0.s.sec_err = -1; /* Done, re-arm */
43 do_clear = true;
44 }
45
46 if (cfg0.s.ded_err) {
47 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, 0, 0, 0,
48 -1, -1, -1, msg, "");
49 cfg0.s.ded_err = -1; /* Done, re-arm */
50 do_clear = true;
51 }
52 if (do_clear)
53 cvmx_write_csr(CVMX_LMCX_MEM_CFG0(mci->mc_idx), cfg0.u64);
54}
55
56static void octeon_lmc_edac_poll_o2(struct mem_ctl_info *mci)
57{
58 union cvmx_lmcx_int int_reg;
59 bool do_clear = false;
60 char msg[64];
61
62 int_reg.u64 = cvmx_read_csr(CVMX_LMCX_INT(mci->mc_idx));
63 if (int_reg.s.sec_err || int_reg.s.ded_err) {
64 union cvmx_lmcx_fadr fadr;
65 fadr.u64 = cvmx_read_csr(CVMX_LMCX_FADR(mci->mc_idx));
66 snprintf(msg, sizeof(msg),
67 "DIMM %d rank %d bank %d row %d col %d",
68 fadr.cn61xx.fdimm, fadr.cn61xx.fbunk,
69 fadr.cn61xx.fbank, fadr.cn61xx.frow, fadr.cn61xx.fcol);
70 }
71
72 if (int_reg.s.sec_err) {
73 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0,
74 -1, -1, -1, msg, "");
75 int_reg.s.sec_err = -1; /* Done, re-arm */
76 do_clear = true;
77 }
78
79 if (int_reg.s.ded_err) {
80 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, 0, 0, 0,
81 -1, -1, -1, msg, "");
82 int_reg.s.ded_err = -1; /* Done, re-arm */
83 do_clear = true;
84 }
85 if (do_clear)
86 cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64);
87}
88
89static int octeon_lmc_edac_probe(struct platform_device *pdev)
90{
91 struct mem_ctl_info *mci;
92 struct edac_mc_layer layers[1];
93 int mc = pdev->id;
94
95 layers[0].type = EDAC_MC_LAYER_CHANNEL;
96 layers[0].size = 1;
97 layers[0].is_virt_csrow = false;
98
99 if (OCTEON_IS_MODEL(OCTEON_FAM_1_PLUS)) {
100 union cvmx_lmcx_mem_cfg0 cfg0;
101
102 cfg0.u64 = cvmx_read_csr(CVMX_LMCX_MEM_CFG0(0));
103 if (!cfg0.s.ecc_ena) {
104 dev_info(&pdev->dev, "Disabled (ECC not enabled)\n");
105 return 0;
106 }
107
108 mci = edac_mc_alloc(mc, ARRAY_SIZE(layers), layers, 0);
109 if (!mci)
110 return -ENXIO;
111
112 mci->pdev = &pdev->dev;
113 mci->dev_name = dev_name(&pdev->dev);
114
115 mci->mod_name = "octeon-lmc";
116 mci->ctl_name = "octeon-lmc-err";
117 mci->edac_check = octeon_lmc_edac_poll;
118
119 if (edac_mc_add_mc(mci)) {
120 dev_err(&pdev->dev, "edac_mc_add_mc() failed\n");
121 edac_mc_free(mci);
122 return -ENXIO;
123 }
124
125 cfg0.u64 = cvmx_read_csr(CVMX_LMCX_MEM_CFG0(mc));
126 cfg0.s.intr_ded_ena = 0; /* We poll */
127 cfg0.s.intr_sec_ena = 0;
128 cvmx_write_csr(CVMX_LMCX_MEM_CFG0(mc), cfg0.u64);
129 } else {
130 /* OCTEON II */
131 union cvmx_lmcx_int_en en;
132 union cvmx_lmcx_config config;
133
134 config.u64 = cvmx_read_csr(CVMX_LMCX_CONFIG(0));
135 if (!config.s.ecc_ena) {
136 dev_info(&pdev->dev, "Disabled (ECC not enabled)\n");
137 return 0;
138 }
139
140 mci = edac_mc_alloc(mc, ARRAY_SIZE(layers), layers, 0);
141 if (!mci)
142 return -ENXIO;
143
144 mci->pdev = &pdev->dev;
145 mci->dev_name = dev_name(&pdev->dev);
146
147 mci->mod_name = "octeon-lmc";
148 mci->ctl_name = "co_lmc_err";
149 mci->edac_check = octeon_lmc_edac_poll_o2;
150
151 if (edac_mc_add_mc(mci)) {
152 dev_err(&pdev->dev, "edac_mc_add_mc() failed\n");
153 edac_mc_free(mci);
154 return -ENXIO;
155 }
156
157 en.u64 = cvmx_read_csr(CVMX_LMCX_MEM_CFG0(mc));
158 en.s.intr_ded_ena = 0; /* We poll */
159 en.s.intr_sec_ena = 0;
160 cvmx_write_csr(CVMX_LMCX_MEM_CFG0(mc), en.u64);
161 }
162 platform_set_drvdata(pdev, mci);
163
164 return 0;
165}
166
167static int octeon_lmc_edac_remove(struct platform_device *pdev)
168{
169 struct mem_ctl_info *mci = platform_get_drvdata(pdev);
170
171 edac_mc_del_mc(&pdev->dev);
172 edac_mc_free(mci);
173 return 0;
174}
175
176static struct platform_driver octeon_lmc_edac_driver = {
177 .probe = octeon_lmc_edac_probe,
178 .remove = octeon_lmc_edac_remove,
179 .driver = {
180 .name = "octeon_lmc_edac",
181 }
182};
183module_platform_driver(octeon_lmc_edac_driver);
184
185MODULE_LICENSE("GPL");
186MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
diff --git a/drivers/edac/octeon_edac-pc.c b/drivers/edac/octeon_edac-pc.c
new file mode 100644
index 000000000000..0f83c33a7d1f
--- /dev/null
+++ b/drivers/edac/octeon_edac-pc.c
@@ -0,0 +1,143 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2012 Cavium, Inc.
7 *
8 * Copyright (C) 2009 Wind River Systems,
9 * written by Ralf Baechle <ralf@linux-mips.org>
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/slab.h>
14#include <linux/interrupt.h>
15#include <linux/io.h>
16#include <linux/edac.h>
17
18#include "edac_core.h"
19#include "edac_module.h"
20
21#include <asm/octeon/cvmx.h>
22#include <asm/mipsregs.h>
23
24extern int register_co_cache_error_notifier(struct notifier_block *nb);
25extern int unregister_co_cache_error_notifier(struct notifier_block *nb);
26
27extern unsigned long long cache_err_dcache[NR_CPUS];
28
29struct co_cache_error {
30 struct notifier_block notifier;
31 struct edac_device_ctl_info *ed;
32};
33
34/**
35 * EDAC CPU cache error callback
36 *
37 * @event: non-zero if unrecoverable.
38 */
39static int co_cache_error_event(struct notifier_block *this,
40 unsigned long event, void *ptr)
41{
42 struct co_cache_error *p = container_of(this, struct co_cache_error,
43 notifier);
44
45 unsigned int core = cvmx_get_core_num();
46 unsigned int cpu = smp_processor_id();
47 u64 icache_err = read_octeon_c0_icacheerr();
48 u64 dcache_err;
49
50 if (event) {
51 dcache_err = cache_err_dcache[core];
52 cache_err_dcache[core] = 0;
53 } else {
54 dcache_err = read_octeon_c0_dcacheerr();
55 }
56
57 if (icache_err & 1) {
58 edac_device_printk(p->ed, KERN_ERR,
59 "CacheErr (Icache):%llx, core %d/cpu %d, cp0_errorepc == %lx\n",
60 (unsigned long long)icache_err, core, cpu,
61 read_c0_errorepc());
62 write_octeon_c0_icacheerr(0);
63 edac_device_handle_ce(p->ed, cpu, 1, "icache");
64 }
65 if (dcache_err & 1) {
66 edac_device_printk(p->ed, KERN_ERR,
67 "CacheErr (Dcache):%llx, core %d/cpu %d, cp0_errorepc == %lx\n",
68 (unsigned long long)dcache_err, core, cpu,
69 read_c0_errorepc());
70 if (event)
71 edac_device_handle_ue(p->ed, cpu, 0, "dcache");
72 else
73 edac_device_handle_ce(p->ed, cpu, 0, "dcache");
74
75 /* Clear the error indication */
76 if (OCTEON_IS_MODEL(OCTEON_FAM_2))
77 write_octeon_c0_dcacheerr(1);
78 else
79 write_octeon_c0_dcacheerr(0);
80 }
81
82 return NOTIFY_STOP;
83}
84
85static int co_cache_error_probe(struct platform_device *pdev)
86{
87 struct co_cache_error *p = devm_kzalloc(&pdev->dev, sizeof(*p),
88 GFP_KERNEL);
89 if (!p)
90 return -ENOMEM;
91
92 p->notifier.notifier_call = co_cache_error_event;
93 platform_set_drvdata(pdev, p);
94
95 p->ed = edac_device_alloc_ctl_info(0, "cpu", num_possible_cpus(),
96 "cache", 2, 0, NULL, 0,
97 edac_device_alloc_index());
98 if (!p->ed)
99 goto err;
100
101 p->ed->dev = &pdev->dev;
102
103 p->ed->dev_name = dev_name(&pdev->dev);
104
105 p->ed->mod_name = "octeon-cpu";
106 p->ed->ctl_name = "cache";
107
108 if (edac_device_add_device(p->ed)) {
109 pr_err("%s: edac_device_add_device() failed\n", __func__);
110 goto err1;
111 }
112
113 register_co_cache_error_notifier(&p->notifier);
114
115 return 0;
116
117err1:
118 edac_device_free_ctl_info(p->ed);
119err:
120 return -ENXIO;
121}
122
123static int co_cache_error_remove(struct platform_device *pdev)
124{
125 struct co_cache_error *p = platform_get_drvdata(pdev);
126
127 unregister_co_cache_error_notifier(&p->notifier);
128 edac_device_del_device(&pdev->dev);
129 edac_device_free_ctl_info(p->ed);
130 return 0;
131}
132
133static struct platform_driver co_cache_error_driver = {
134 .probe = co_cache_error_probe,
135 .remove = co_cache_error_remove,
136 .driver = {
137 .name = "octeon_pc_edac",
138 }
139};
140module_platform_driver(co_cache_error_driver);
141
142MODULE_LICENSE("GPL");
143MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
diff --git a/drivers/edac/octeon_edac-pci.c b/drivers/edac/octeon_edac-pci.c
new file mode 100644
index 000000000000..9ca73cec74e7
--- /dev/null
+++ b/drivers/edac/octeon_edac-pci.c
@@ -0,0 +1,111 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2012 Cavium, Inc.
7 * Copyright (C) 2009 Wind River Systems,
8 * written by Ralf Baechle <ralf@linux-mips.org>
9 */
10#include <linux/module.h>
11#include <linux/init.h>
12#include <linux/slab.h>
13#include <linux/io.h>
14#include <linux/edac.h>
15
16#include <asm/octeon/cvmx.h>
17#include <asm/octeon/cvmx-npi-defs.h>
18#include <asm/octeon/cvmx-pci-defs.h>
19#include <asm/octeon/octeon.h>
20
21#include "edac_core.h"
22#include "edac_module.h"
23
24static void octeon_pci_poll(struct edac_pci_ctl_info *pci)
25{
26 union cvmx_pci_cfg01 cfg01;
27
28 cfg01.u32 = octeon_npi_read32(CVMX_NPI_PCI_CFG01);
29 if (cfg01.s.dpe) { /* Detected parity error */
30 edac_pci_handle_pe(pci, pci->ctl_name);
31 cfg01.s.dpe = 1; /* Reset */
32 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
33 }
34 if (cfg01.s.sse) {
35 edac_pci_handle_npe(pci, "Signaled System Error");
36 cfg01.s.sse = 1; /* Reset */
37 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
38 }
39 if (cfg01.s.rma) {
40 edac_pci_handle_npe(pci, "Received Master Abort");
41 cfg01.s.rma = 1; /* Reset */
42 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
43 }
44 if (cfg01.s.rta) {
45 edac_pci_handle_npe(pci, "Received Target Abort");
46 cfg01.s.rta = 1; /* Reset */
47 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
48 }
49 if (cfg01.s.sta) {
50 edac_pci_handle_npe(pci, "Signaled Target Abort");
51 cfg01.s.sta = 1; /* Reset */
52 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
53 }
54 if (cfg01.s.mdpe) {
55 edac_pci_handle_npe(pci, "Master Data Parity Error");
56 cfg01.s.mdpe = 1; /* Reset */
57 octeon_npi_write32(CVMX_NPI_PCI_CFG01, cfg01.u32);
58 }
59}
60
61static int octeon_pci_probe(struct platform_device *pdev)
62{
63 struct edac_pci_ctl_info *pci;
64 int res = 0;
65
66 pci = edac_pci_alloc_ctl_info(0, "octeon_pci_err");
67 if (!pci)
68 return -ENOMEM;
69
70 pci->dev = &pdev->dev;
71 platform_set_drvdata(pdev, pci);
72 pci->dev_name = dev_name(&pdev->dev);
73
74 pci->mod_name = "octeon-pci";
75 pci->ctl_name = "octeon_pci_err";
76 pci->edac_check = octeon_pci_poll;
77
78 if (edac_pci_add_device(pci, 0) > 0) {
79 pr_err("%s: edac_pci_add_device() failed\n", __func__);
80 goto err;
81 }
82
83 return 0;
84
85err:
86 edac_pci_free_ctl_info(pci);
87
88 return res;
89}
90
91static int octeon_pci_remove(struct platform_device *pdev)
92{
93 struct edac_pci_ctl_info *pci = platform_get_drvdata(pdev);
94
95 edac_pci_del_device(&pdev->dev);
96 edac_pci_free_ctl_info(pci);
97
98 return 0;
99}
100
101static struct platform_driver octeon_pci_driver = {
102 .probe = octeon_pci_probe,
103 .remove = octeon_pci_remove,
104 .driver = {
105 .name = "octeon_pci_edac",
106 }
107};
108module_platform_driver(octeon_pci_driver);
109
110MODULE_LICENSE("GPL");
111MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c
index 2d35b78ada3c..9c971b575530 100644
--- a/drivers/edac/pasemi_edac.c
+++ b/drivers/edac/pasemi_edac.c
@@ -188,8 +188,8 @@ static int pasemi_edac_init_csrows(struct mem_ctl_info *mci,
188 return 0; 188 return 0;
189} 189}
190 190
191static int __devinit pasemi_edac_probe(struct pci_dev *pdev, 191static int pasemi_edac_probe(struct pci_dev *pdev,
192 const struct pci_device_id *ent) 192 const struct pci_device_id *ent)
193{ 193{
194 struct mem_ctl_info *mci = NULL; 194 struct mem_ctl_info *mci = NULL;
195 struct edac_mc_layer layers[2]; 195 struct edac_mc_layer layers[2];
@@ -266,7 +266,7 @@ fail:
266 return -ENODEV; 266 return -ENODEV;
267} 267}
268 268
269static void __devexit pasemi_edac_remove(struct pci_dev *pdev) 269static void pasemi_edac_remove(struct pci_dev *pdev)
270{ 270{
271 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); 271 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);
272 272
@@ -287,7 +287,7 @@ MODULE_DEVICE_TABLE(pci, pasemi_edac_pci_tbl);
287static struct pci_driver pasemi_edac_driver = { 287static struct pci_driver pasemi_edac_driver = {
288 .name = MODULE_NAME, 288 .name = MODULE_NAME,
289 .probe = pasemi_edac_probe, 289 .probe = pasemi_edac_probe,
290 .remove = __devexit_p(pasemi_edac_remove), 290 .remove = pasemi_edac_remove,
291 .id_table = pasemi_edac_pci_tbl, 291 .id_table = pasemi_edac_pci_tbl,
292}; 292};
293 293
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index bf0957635991..ef6b7e08f485 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -838,8 +838,7 @@ ppc4xx_edac_isr(int irq, void *dev_id)
838 * 838 *
839 * Returns a device type width enumeration. 839 * Returns a device type width enumeration.
840 */ 840 */
841static enum dev_type __devinit 841static enum dev_type ppc4xx_edac_get_dtype(u32 mcopt1)
842ppc4xx_edac_get_dtype(u32 mcopt1)
843{ 842{
844 switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) { 843 switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) {
845 case SDRAM_MCOPT1_WDTH_16: 844 case SDRAM_MCOPT1_WDTH_16:
@@ -862,8 +861,7 @@ ppc4xx_edac_get_dtype(u32 mcopt1)
862 * 861 *
863 * Returns a memory type enumeration. 862 * Returns a memory type enumeration.
864 */ 863 */
865static enum mem_type __devinit 864static enum mem_type ppc4xx_edac_get_mtype(u32 mcopt1)
866ppc4xx_edac_get_mtype(u32 mcopt1)
867{ 865{
868 bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN); 866 bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN);
869 867
@@ -893,8 +891,7 @@ ppc4xx_edac_get_mtype(u32 mcopt1)
893 * Returns 0 if OK; otherwise, -EINVAL if the memory bank size 891 * Returns 0 if OK; otherwise, -EINVAL if the memory bank size
894 * configuration cannot be determined. 892 * configuration cannot be determined.
895 */ 893 */
896static int __devinit 894static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
897ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
898{ 895{
899 const struct ppc4xx_edac_pdata *pdata = mci->pvt_info; 896 const struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
900 int status = 0; 897 int status = 0;
@@ -1011,11 +1008,9 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
1011 * 1008 *
1012 * Returns 0 if OK; otherwise, < 0 on error. 1009 * Returns 0 if OK; otherwise, < 0 on error.
1013 */ 1010 */
1014static int __devinit 1011static int ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1015ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1012 struct platform_device *op,
1016 struct platform_device *op, 1013 const dcr_host_t *dcr_host, u32 mcopt1)
1017 const dcr_host_t *dcr_host,
1018 u32 mcopt1)
1019{ 1014{
1020 int status = 0; 1015 int status = 0;
1021 const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK); 1016 const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK);
@@ -1105,8 +1100,8 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1105 * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be 1100 * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be
1106 * mapped and assigned. 1101 * mapped and assigned.
1107 */ 1102 */
1108static int __devinit 1103static int ppc4xx_edac_register_irq(struct platform_device *op,
1109ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci) 1104 struct mem_ctl_info *mci)
1110{ 1105{
1111 int status = 0; 1106 int status = 0;
1112 int ded_irq, sec_irq; 1107 int ded_irq, sec_irq;
@@ -1183,8 +1178,8 @@ ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci)
1183 * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on 1178 * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on
1184 * error. 1179 * error.
1185 */ 1180 */
1186static int __devinit 1181static int ppc4xx_edac_map_dcrs(const struct device_node *np,
1187ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) 1182 dcr_host_t *dcr_host)
1188{ 1183{
1189 unsigned int dcr_base, dcr_len; 1184 unsigned int dcr_base, dcr_len;
1190 1185
@@ -1232,7 +1227,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1232 * Returns 0 if the controller instance was successfully bound to the 1227 * Returns 0 if the controller instance was successfully bound to the
1233 * driver; otherwise, < 0 on error. 1228 * driver; otherwise, < 0 on error.
1234 */ 1229 */
1235static int __devinit ppc4xx_edac_probe(struct platform_device *op) 1230static int ppc4xx_edac_probe(struct platform_device *op)
1236{ 1231{
1237 int status = 0; 1232 int status = 0;
1238 u32 mcopt1, memcheck; 1233 u32 mcopt1, memcheck;
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index f854debd5533..2fd6a5490905 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -359,8 +359,8 @@ fail:
359} 359}
360 360
361/* returns count (>= 0), or negative on error */ 361/* returns count (>= 0), or negative on error */
362static int __devinit r82600_init_one(struct pci_dev *pdev, 362static int r82600_init_one(struct pci_dev *pdev,
363 const struct pci_device_id *ent) 363 const struct pci_device_id *ent)
364{ 364{
365 edac_dbg(0, "\n"); 365 edac_dbg(0, "\n");
366 366
@@ -368,7 +368,7 @@ static int __devinit r82600_init_one(struct pci_dev *pdev,
368 return r82600_probe1(pdev, ent->driver_data); 368 return r82600_probe1(pdev, ent->driver_data);
369} 369}
370 370
371static void __devexit r82600_remove_one(struct pci_dev *pdev) 371static void r82600_remove_one(struct pci_dev *pdev)
372{ 372{
373 struct mem_ctl_info *mci; 373 struct mem_ctl_info *mci;
374 374
@@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(pci, r82600_pci_tbl);
397static struct pci_driver r82600_driver = { 397static struct pci_driver r82600_driver = {
398 .name = EDAC_MOD_STR, 398 .name = EDAC_MOD_STR,
399 .probe = r82600_init_one, 399 .probe = r82600_init_one,
400 .remove = __devexit_p(r82600_remove_one), 400 .remove = r82600_remove_one,
401 .id_table = r82600_pci_tbl, 401 .id_table = r82600_pci_tbl,
402}; 402};
403 403
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 9ad24242ea18..57244f995614 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1692,8 +1692,7 @@ fail0:
1692 * < 0 for error code 1692 * < 0 for error code
1693 */ 1693 */
1694 1694
1695static int __devinit sbridge_probe(struct pci_dev *pdev, 1695static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1696 const struct pci_device_id *id)
1697{ 1696{
1698 int rc; 1697 int rc;
1699 u8 mc, num_mc = 0; 1698 u8 mc, num_mc = 0;
@@ -1744,7 +1743,7 @@ fail0:
1744 * sbridge_remove destructor for one instance of device 1743 * sbridge_remove destructor for one instance of device
1745 * 1744 *
1746 */ 1745 */
1747static void __devexit sbridge_remove(struct pci_dev *pdev) 1746static void sbridge_remove(struct pci_dev *pdev)
1748{ 1747{
1749 struct sbridge_dev *sbridge_dev; 1748 struct sbridge_dev *sbridge_dev;
1750 1749
@@ -1785,7 +1784,7 @@ MODULE_DEVICE_TABLE(pci, sbridge_pci_tbl);
1785static struct pci_driver sbridge_driver = { 1784static struct pci_driver sbridge_driver = {
1786 .name = "sbridge_edac", 1785 .name = "sbridge_edac",
1787 .probe = sbridge_probe, 1786 .probe = sbridge_probe,
1788 .remove = __devexit_p(sbridge_remove), 1787 .remove = sbridge_remove,
1789 .id_table = sbridge_pci_tbl, 1788 .id_table = sbridge_pci_tbl,
1790}; 1789};
1791 1790
diff --git a/drivers/edac/tile_edac.c b/drivers/edac/tile_edac.c
index 1e904b7b79a0..a0820536b7d9 100644
--- a/drivers/edac/tile_edac.c
+++ b/drivers/edac/tile_edac.c
@@ -82,7 +82,7 @@ static void tile_edac_check(struct mem_ctl_info *mci)
82 * Initialize the 'csrows' table within the mci control structure with the 82 * Initialize the 'csrows' table within the mci control structure with the
83 * addressing of memory. 83 * addressing of memory.
84 */ 84 */
85static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci) 85static int tile_edac_init_csrows(struct mem_ctl_info *mci)
86{ 86{
87 struct csrow_info *csrow = mci->csrows[0]; 87 struct csrow_info *csrow = mci->csrows[0];
88 struct tile_edac_priv *priv = mci->pvt_info; 88 struct tile_edac_priv *priv = mci->pvt_info;
@@ -120,7 +120,7 @@ static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci)
120 return 0; 120 return 0;
121} 121}
122 122
123static int __devinit tile_edac_mc_probe(struct platform_device *pdev) 123static int tile_edac_mc_probe(struct platform_device *pdev)
124{ 124{
125 char hv_file[32]; 125 char hv_file[32];
126 int hv_devhdl; 126 int hv_devhdl;
@@ -186,7 +186,7 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev)
186 return 0; 186 return 0;
187} 187}
188 188
189static int __devexit tile_edac_mc_remove(struct platform_device *pdev) 189static int tile_edac_mc_remove(struct platform_device *pdev)
190{ 190{
191 struct mem_ctl_info *mci = platform_get_drvdata(pdev); 191 struct mem_ctl_info *mci = platform_get_drvdata(pdev);
192 192
@@ -202,7 +202,7 @@ static struct platform_driver tile_edac_mc_driver = {
202 .owner = THIS_MODULE, 202 .owner = THIS_MODULE,
203 }, 203 },
204 .probe = tile_edac_mc_probe, 204 .probe = tile_edac_mc_probe,
205 .remove = __devexit_p(tile_edac_mc_remove), 205 .remove = tile_edac_mc_remove,
206}; 206};
207 207
208/* 208/*
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 08a992693e62..c9db24d95caa 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -418,8 +418,7 @@ fail:
418 return rc; 418 return rc;
419} 419}
420 420
421static int __devinit x38_init_one(struct pci_dev *pdev, 421static int x38_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
422 const struct pci_device_id *ent)
423{ 422{
424 int rc; 423 int rc;
425 424
@@ -435,7 +434,7 @@ static int __devinit x38_init_one(struct pci_dev *pdev,
435 return rc; 434 return rc;
436} 435}
437 436
438static void __devexit x38_remove_one(struct pci_dev *pdev) 437static void x38_remove_one(struct pci_dev *pdev)
439{ 438{
440 struct mem_ctl_info *mci; 439 struct mem_ctl_info *mci;
441 440
@@ -464,7 +463,7 @@ MODULE_DEVICE_TABLE(pci, x38_pci_tbl);
464static struct pci_driver x38_driver = { 463static struct pci_driver x38_driver = {
465 .name = EDAC_MOD_STR, 464 .name = EDAC_MOD_STR,
466 .probe = x38_init_one, 465 .probe = x38_init_one,
467 .remove = __devexit_p(x38_remove_one), 466 .remove = x38_remove_one,
468 .id_table = x38_pci_tbl, 467 .id_table = x38_pci_tbl,
469}; 468};
470 469