diff options
-rw-r--r-- | drivers/edac/amd76x_edac.c | 7 | ||||
-rw-r--r-- | drivers/edac/e752x_edac.c | 15 | ||||
-rw-r--r-- | drivers/edac/e7xxx_edac.c | 13 | ||||
-rw-r--r-- | drivers/edac/i3000_edac.c | 13 | ||||
-rw-r--r-- | drivers/edac/i5000_edac.c | 14 | ||||
-rw-r--r-- | drivers/edac/i82443bxgx_edac.c | 7 | ||||
-rw-r--r-- | drivers/edac/i82860_edac.c | 7 | ||||
-rw-r--r-- | drivers/edac/i82875p_edac.c | 9 | ||||
-rw-r--r-- | drivers/edac/i82975x_edac.c | 8 | ||||
-rw-r--r-- | drivers/edac/pasemi_edac.c | 6 | ||||
-rw-r--r-- | drivers/edac/r82600_edac.c | 7 | ||||
-rw-r--r-- | include/linux/edac.h | 14 |
12 files changed, 79 insertions, 41 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index f22075410591..2b95f1a3edfc 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/pci_ids.h> | 18 | #include <linux/pci_ids.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/edac.h> | ||
20 | #include "edac_core.h" | 21 | #include "edac_core.h" |
21 | 22 | ||
22 | #define AMD76X_REVISION " Ver: 2.0.2 " __DATE__ | 23 | #define AMD76X_REVISION " Ver: 2.0.2 " __DATE__ |
@@ -344,6 +345,9 @@ static struct pci_driver amd76x_driver = { | |||
344 | 345 | ||
345 | static int __init amd76x_init(void) | 346 | static int __init amd76x_init(void) |
346 | { | 347 | { |
348 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
349 | opstate_init(); | ||
350 | |||
347 | return pci_register_driver(&amd76x_driver); | 351 | return pci_register_driver(&amd76x_driver); |
348 | } | 352 | } |
349 | 353 | ||
@@ -358,3 +362,6 @@ module_exit(amd76x_exit); | |||
358 | MODULE_LICENSE("GPL"); | 362 | MODULE_LICENSE("GPL"); |
359 | MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh"); | 363 | MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh"); |
360 | MODULE_DESCRIPTION("MC support for AMD 76x memory controllers"); | 364 | MODULE_DESCRIPTION("MC support for AMD 76x memory controllers"); |
365 | |||
366 | module_param(edac_op_state, int, 0444); | ||
367 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 12e7677b834b..c94a0eb492cb 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -1117,16 +1117,6 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1117 | debugf0("%s(): mci\n", __func__); | 1117 | debugf0("%s(): mci\n", __func__); |
1118 | debugf0("Starting Probe1\n"); | 1118 | debugf0("Starting Probe1\n"); |
1119 | 1119 | ||
1120 | /* make sure error reporting method is sane */ | ||
1121 | switch (edac_op_state) { | ||
1122 | case EDAC_OPSTATE_POLL: | ||
1123 | case EDAC_OPSTATE_NMI: | ||
1124 | break; | ||
1125 | default: | ||
1126 | edac_op_state = EDAC_OPSTATE_POLL; | ||
1127 | break; | ||
1128 | } | ||
1129 | |||
1130 | /* check to see if device 0 function 1 is enabled; if it isn't, we | 1120 | /* check to see if device 0 function 1 is enabled; if it isn't, we |
1131 | * assume the BIOS has reserved it for a reason and is expecting | 1121 | * assume the BIOS has reserved it for a reason and is expecting |
1132 | * exclusive access, we take care not to violate that assumption and | 1122 | * exclusive access, we take care not to violate that assumption and |
@@ -1303,6 +1293,10 @@ static int __init e752x_init(void) | |||
1303 | int pci_rc; | 1293 | int pci_rc; |
1304 | 1294 | ||
1305 | debugf3("%s()\n", __func__); | 1295 | debugf3("%s()\n", __func__); |
1296 | |||
1297 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
1298 | opstate_init(); | ||
1299 | |||
1306 | pci_rc = pci_register_driver(&e752x_driver); | 1300 | pci_rc = pci_register_driver(&e752x_driver); |
1307 | return (pci_rc < 0) ? pci_rc : 0; | 1301 | return (pci_rc < 0) ? pci_rc : 0; |
1308 | } | 1302 | } |
@@ -1323,6 +1317,7 @@ MODULE_DESCRIPTION("MC support for Intel e752x/3100 memory controllers"); | |||
1323 | module_param(force_function_unhide, int, 0444); | 1317 | module_param(force_function_unhide, int, 0444); |
1324 | MODULE_PARM_DESC(force_function_unhide, "if BIOS sets Dev0:Fun1 up as hidden:" | 1318 | MODULE_PARM_DESC(force_function_unhide, "if BIOS sets Dev0:Fun1 up as hidden:" |
1325 | " 1=force unhide and hope BIOS doesn't fight driver for Dev0:Fun1 access"); | 1319 | " 1=force unhide and hope BIOS doesn't fight driver for Dev0:Fun1 access"); |
1320 | |||
1326 | module_param(edac_op_state, int, 0444); | 1321 | module_param(edac_op_state, int, 0444); |
1327 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | 1322 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); |
1328 | 1323 | ||
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 96ecc4926641..c7d11cc4e21a 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -414,16 +414,6 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
414 | 414 | ||
415 | debugf0("%s(): mci\n", __func__); | 415 | debugf0("%s(): mci\n", __func__); |
416 | 416 | ||
417 | /* make sure error reporting method is sane */ | ||
418 | switch (edac_op_state) { | ||
419 | case EDAC_OPSTATE_POLL: | ||
420 | case EDAC_OPSTATE_NMI: | ||
421 | break; | ||
422 | default: | ||
423 | edac_op_state = EDAC_OPSTATE_POLL; | ||
424 | break; | ||
425 | } | ||
426 | |||
427 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); | 417 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); |
428 | 418 | ||
429 | drc_chan = dual_channel_active(drc, dev_idx); | 419 | drc_chan = dual_channel_active(drc, dev_idx); |
@@ -565,6 +555,9 @@ static struct pci_driver e7xxx_driver = { | |||
565 | 555 | ||
566 | static int __init e7xxx_init(void) | 556 | static int __init e7xxx_init(void) |
567 | { | 557 | { |
558 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
559 | opstate_init(); | ||
560 | |||
568 | return pci_register_driver(&e7xxx_driver); | 561 | return pci_register_driver(&e7xxx_driver); |
569 | } | 562 | } |
570 | 563 | ||
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index 5d4292811c14..6c9a0f2a593c 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c | |||
@@ -326,15 +326,6 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx) | |||
326 | return -ENODEV; | 326 | return -ENODEV; |
327 | } | 327 | } |
328 | 328 | ||
329 | switch (edac_op_state) { | ||
330 | case EDAC_OPSTATE_POLL: | ||
331 | case EDAC_OPSTATE_NMI: | ||
332 | break; | ||
333 | default: | ||
334 | edac_op_state = EDAC_OPSTATE_POLL; | ||
335 | break; | ||
336 | } | ||
337 | |||
338 | c0dra[0] = readb(window + I3000_C0DRA + 0); /* ranks 0,1 */ | 329 | c0dra[0] = readb(window + I3000_C0DRA + 0); /* ranks 0,1 */ |
339 | c0dra[1] = readb(window + I3000_C0DRA + 1); /* ranks 2,3 */ | 330 | c0dra[1] = readb(window + I3000_C0DRA + 1); /* ranks 2,3 */ |
340 | c1dra[0] = readb(window + I3000_C1DRA + 0); /* ranks 0,1 */ | 331 | c1dra[0] = readb(window + I3000_C1DRA + 0); /* ranks 0,1 */ |
@@ -503,6 +494,10 @@ static int __init i3000_init(void) | |||
503 | int pci_rc; | 494 | int pci_rc; |
504 | 495 | ||
505 | debugf3("MC: %s()\n", __func__); | 496 | debugf3("MC: %s()\n", __func__); |
497 | |||
498 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
499 | opstate_init(); | ||
500 | |||
506 | pci_rc = pci_register_driver(&i3000_driver); | 501 | pci_rc = pci_register_driver(&i3000_driver); |
507 | if (pci_rc < 0) | 502 | if (pci_rc < 0) |
508 | goto fail0; | 503 | goto fail0; |
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index 5a852017c17a..4a16b5b61cfb 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -1286,16 +1286,6 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1286 | if (PCI_FUNC(pdev->devfn) != 0) | 1286 | if (PCI_FUNC(pdev->devfn) != 0) |
1287 | return -ENODEV; | 1287 | return -ENODEV; |
1288 | 1288 | ||
1289 | /* make sure error reporting method is sane */ | ||
1290 | switch (edac_op_state) { | ||
1291 | case EDAC_OPSTATE_POLL: | ||
1292 | case EDAC_OPSTATE_NMI: | ||
1293 | break; | ||
1294 | default: | ||
1295 | edac_op_state = EDAC_OPSTATE_POLL; | ||
1296 | break; | ||
1297 | } | ||
1298 | |||
1299 | /* Ask the devices for the number of CSROWS and CHANNELS so | 1289 | /* Ask the devices for the number of CSROWS and CHANNELS so |
1300 | * that we can calculate the memory resources, etc | 1290 | * that we can calculate the memory resources, etc |
1301 | * | 1291 | * |
@@ -1478,6 +1468,9 @@ static int __init i5000_init(void) | |||
1478 | 1468 | ||
1479 | debugf2("MC: " __FILE__ ": %s()\n", __func__); | 1469 | debugf2("MC: " __FILE__ ": %s()\n", __func__); |
1480 | 1470 | ||
1471 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
1472 | opstate_init(); | ||
1473 | |||
1481 | pci_rc = pci_register_driver(&i5000_driver); | 1474 | pci_rc = pci_register_driver(&i5000_driver); |
1482 | 1475 | ||
1483 | return (pci_rc < 0) ? pci_rc : 0; | 1476 | return (pci_rc < 0) ? pci_rc : 0; |
@@ -1501,5 +1494,6 @@ MODULE_AUTHOR | |||
1501 | ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>"); | 1494 | ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>"); |
1502 | MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " | 1495 | MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " |
1503 | I5000_REVISION); | 1496 | I5000_REVISION); |
1497 | |||
1504 | module_param(edac_op_state, int, 0444); | 1498 | module_param(edac_op_state, int, 0444); |
1505 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | 1499 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); |
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index 83bfe37c4bbb..c5305e3ee434 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | 31 | ||
32 | #include <linux/edac.h> | ||
32 | #include "edac_core.h" | 33 | #include "edac_core.h" |
33 | 34 | ||
34 | #define I82443_REVISION "0.1" | 35 | #define I82443_REVISION "0.1" |
@@ -386,6 +387,9 @@ static struct pci_driver i82443bxgx_edacmc_driver = { | |||
386 | 387 | ||
387 | static int __init i82443bxgx_edacmc_init(void) | 388 | static int __init i82443bxgx_edacmc_init(void) |
388 | { | 389 | { |
390 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
391 | opstate_init(); | ||
392 | |||
389 | return pci_register_driver(&i82443bxgx_edacmc_driver); | 393 | return pci_register_driver(&i82443bxgx_edacmc_driver); |
390 | } | 394 | } |
391 | 395 | ||
@@ -400,3 +404,6 @@ module_exit(i82443bxgx_edacmc_exit); | |||
400 | MODULE_LICENSE("GPL"); | 404 | MODULE_LICENSE("GPL"); |
401 | MODULE_AUTHOR("Tim Small <tim@buttersideup.com> - WPAD"); | 405 | MODULE_AUTHOR("Tim Small <tim@buttersideup.com> - WPAD"); |
402 | MODULE_DESCRIPTION("EDAC MC support for Intel 82443BX/GX memory controllers"); | 406 | MODULE_DESCRIPTION("EDAC MC support for Intel 82443BX/GX memory controllers"); |
407 | |||
408 | module_param(edac_op_state, int, 0444); | ||
409 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index f5ecd2c4d813..c0088ba9672b 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/edac.h> | ||
17 | #include "edac_core.h" | 18 | #include "edac_core.h" |
18 | 19 | ||
19 | #define I82860_REVISION " Ver: 2.0.2 " __DATE__ | 20 | #define I82860_REVISION " Ver: 2.0.2 " __DATE__ |
@@ -294,6 +295,9 @@ static int __init i82860_init(void) | |||
294 | 295 | ||
295 | debugf3("%s()\n", __func__); | 296 | debugf3("%s()\n", __func__); |
296 | 297 | ||
298 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
299 | opstate_init(); | ||
300 | |||
297 | if ((pci_rc = pci_register_driver(&i82860_driver)) < 0) | 301 | if ((pci_rc = pci_register_driver(&i82860_driver)) < 0) |
298 | goto fail0; | 302 | goto fail0; |
299 | 303 | ||
@@ -345,3 +349,6 @@ MODULE_LICENSE("GPL"); | |||
345 | MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com) " | 349 | MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com) " |
346 | "Ben Woodard <woodard@redhat.com>"); | 350 | "Ben Woodard <woodard@redhat.com>"); |
347 | MODULE_DESCRIPTION("ECC support for Intel 82860 memory hub controllers"); | 351 | MODULE_DESCRIPTION("ECC support for Intel 82860 memory hub controllers"); |
352 | |||
353 | module_param(edac_op_state, int, 0444); | ||
354 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 031abadc439a..e43bdc43a1bf 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/pci_ids.h> | 19 | #include <linux/pci_ids.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/edac.h> | ||
21 | #include "edac_core.h" | 22 | #include "edac_core.h" |
22 | 23 | ||
23 | #define I82875P_REVISION " Ver: 2.0.2 " __DATE__ | 24 | #define I82875P_REVISION " Ver: 2.0.2 " __DATE__ |
@@ -393,6 +394,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) | |||
393 | struct i82875p_error_info discard; | 394 | struct i82875p_error_info discard; |
394 | 395 | ||
395 | debugf0("%s()\n", __func__); | 396 | debugf0("%s()\n", __func__); |
397 | |||
396 | ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); | 398 | ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); |
397 | 399 | ||
398 | if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window)) | 400 | if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window)) |
@@ -532,6 +534,10 @@ static int __init i82875p_init(void) | |||
532 | int pci_rc; | 534 | int pci_rc; |
533 | 535 | ||
534 | debugf3("%s()\n", __func__); | 536 | debugf3("%s()\n", __func__); |
537 | |||
538 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
539 | opstate_init(); | ||
540 | |||
535 | pci_rc = pci_register_driver(&i82875p_driver); | 541 | pci_rc = pci_register_driver(&i82875p_driver); |
536 | 542 | ||
537 | if (pci_rc < 0) | 543 | if (pci_rc < 0) |
@@ -586,3 +592,6 @@ module_exit(i82875p_exit); | |||
586 | MODULE_LICENSE("GPL"); | 592 | MODULE_LICENSE("GPL"); |
587 | MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh"); | 593 | MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh"); |
588 | MODULE_DESCRIPTION("MC support for Intel 82875 memory hub controllers"); | 594 | MODULE_DESCRIPTION("MC support for Intel 82875 memory hub controllers"); |
595 | |||
596 | module_param(edac_op_state, int, 0444); | ||
597 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index 0ee888456932..2eed3ea2cf62 100644 --- a/drivers/edac/i82975x_edac.c +++ b/drivers/edac/i82975x_edac.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | 17 | #include <linux/edac.h> | |
18 | #include "edac_core.h" | 18 | #include "edac_core.h" |
19 | 19 | ||
20 | #define I82975X_REVISION " Ver: 1.0.0 " __DATE__ | 20 | #define I82975X_REVISION " Ver: 1.0.0 " __DATE__ |
@@ -611,6 +611,9 @@ static int __init i82975x_init(void) | |||
611 | 611 | ||
612 | debugf3("%s()\n", __func__); | 612 | debugf3("%s()\n", __func__); |
613 | 613 | ||
614 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
615 | opstate_init(); | ||
616 | |||
614 | pci_rc = pci_register_driver(&i82975x_driver); | 617 | pci_rc = pci_register_driver(&i82975x_driver); |
615 | if (pci_rc < 0) | 618 | if (pci_rc < 0) |
616 | goto fail0; | 619 | goto fail0; |
@@ -664,3 +667,6 @@ module_exit(i82975x_exit); | |||
664 | MODULE_LICENSE("GPL"); | 667 | MODULE_LICENSE("GPL"); |
665 | MODULE_AUTHOR("Arvind R. <arvind@acarlab.com>"); | 668 | MODULE_AUTHOR("Arvind R. <arvind@acarlab.com>"); |
666 | MODULE_DESCRIPTION("MC support for Intel 82975 memory hub controllers"); | 669 | MODULE_DESCRIPTION("MC support for Intel 82975 memory hub controllers"); |
670 | |||
671 | module_param(edac_op_state, int, 0444); | ||
672 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c index 90320917be28..3fd65a563848 100644 --- a/drivers/edac/pasemi_edac.c +++ b/drivers/edac/pasemi_edac.c | |||
@@ -284,6 +284,9 @@ static struct pci_driver pasemi_edac_driver = { | |||
284 | 284 | ||
285 | static int __init pasemi_edac_init(void) | 285 | static int __init pasemi_edac_init(void) |
286 | { | 286 | { |
287 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
288 | opstate_init(); | ||
289 | |||
287 | return pci_register_driver(&pasemi_edac_driver); | 290 | return pci_register_driver(&pasemi_edac_driver); |
288 | } | 291 | } |
289 | 292 | ||
@@ -298,3 +301,6 @@ module_exit(pasemi_edac_exit); | |||
298 | MODULE_LICENSE("GPL"); | 301 | MODULE_LICENSE("GPL"); |
299 | MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>"); | 302 | MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>"); |
300 | MODULE_DESCRIPTION("MC support for PA Semi PWRficient memory controller"); | 303 | MODULE_DESCRIPTION("MC support for PA Semi PWRficient memory controller"); |
304 | module_param(edac_op_state, int, 0444); | ||
305 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
306 | |||
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index e25f712f2dc3..9900675e9598 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/pci_ids.h> | 21 | #include <linux/pci_ids.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/edac.h> | ||
23 | #include "edac_core.h" | 24 | #include "edac_core.h" |
24 | 25 | ||
25 | #define R82600_REVISION " Ver: 2.0.2 " __DATE__ | 26 | #define R82600_REVISION " Ver: 2.0.2 " __DATE__ |
@@ -393,6 +394,9 @@ static struct pci_driver r82600_driver = { | |||
393 | 394 | ||
394 | static int __init r82600_init(void) | 395 | static int __init r82600_init(void) |
395 | { | 396 | { |
397 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
398 | opstate_init(); | ||
399 | |||
396 | return pci_register_driver(&r82600_driver); | 400 | return pci_register_driver(&r82600_driver); |
397 | } | 401 | } |
398 | 402 | ||
@@ -412,3 +416,6 @@ MODULE_DESCRIPTION("MC support for Radisys 82600 memory controllers"); | |||
412 | module_param(disable_hardware_scrub, bool, 0644); | 416 | module_param(disable_hardware_scrub, bool, 0644); |
413 | MODULE_PARM_DESC(disable_hardware_scrub, | 417 | MODULE_PARM_DESC(disable_hardware_scrub, |
414 | "If set, disable the chipset's automatic scrub for CEs"); | 418 | "If set, disable the chipset's automatic scrub for CEs"); |
419 | |||
420 | module_param(edac_op_state, int, 0444); | ||
421 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | ||
diff --git a/include/linux/edac.h b/include/linux/edac.h index eab451e69a91..7cf92e8a4196 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Dave Jiang <djiang@mvista.com> | 4 | * Author: Dave Jiang <djiang@mvista.com> |
5 | * | 5 | * |
6 | * 2006-2007 (c) MontaVista Software, Inc. This file is licensed under | 6 | * 2006-2008 (c) MontaVista Software, Inc. This file is licensed under |
7 | * the terms of the GNU General Public License version 2. This program | 7 | * the terms of the GNU General Public License version 2. This program |
8 | * is licensed "as is" without any warranty of any kind, whether express | 8 | * is licensed "as is" without any warranty of any kind, whether express |
9 | * or implied. | 9 | * or implied. |
@@ -26,4 +26,16 @@ extern atomic_t edac_handlers; | |||
26 | extern int edac_handler_set(void); | 26 | extern int edac_handler_set(void); |
27 | extern void edac_atomic_assert_error(void); | 27 | extern void edac_atomic_assert_error(void); |
28 | 28 | ||
29 | static inline void opstate_init(void) | ||
30 | { | ||
31 | switch (edac_op_state) { | ||
32 | case EDAC_OPSTATE_POLL: | ||
33 | case EDAC_OPSTATE_NMI: | ||
34 | break; | ||
35 | default: | ||
36 | edac_op_state = EDAC_OPSTATE_POLL; | ||
37 | } | ||
38 | return; | ||
39 | } | ||
40 | |||
29 | #endif | 41 | #endif |