X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fedac%2Fi3000_edac.c;h=6c9a0f2a593cd89fbc998182798bf1e21894d5ea;hb=ec9f168fcc344d2ffec1c8c822076bf22dab5c33;hp=62d961e689730c69b830f271cec75e8223fe3140;hpb=4d2b165eca960ae12767a6334c51416dca45756c;p=karo-tx-linux.git diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index 62d961e68973..6c9a0f2a593c 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "edac_core.h" #define I3000_REVISION "1.1" @@ -43,6 +44,13 @@ */ #define I3000_DEAP_GRAIN (1 << 7) +/* + * Helper functions to decode the DEAP/EDEAP hardware registers. + * + * The type promotion here is deliberate; we're deriving an + * unsigned long pfn and offset from hardware regs which are u8/u32. + */ + static inline unsigned long deap_pfn(u8 edeap, u32 deap) { deap >>= PAGE_SHIFT; @@ -486,6 +494,10 @@ static int __init i3000_init(void) int pci_rc; debugf3("MC: %s()\n", __func__); + + /* Ensure that the OPSTATE is set correctly for POLL or NMI */ + opstate_init(); + pci_rc = pci_register_driver(&i3000_driver); if (pci_rc < 0) goto fail0; @@ -537,3 +549,6 @@ module_exit(i3000_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Akamai Technologies Arthur Ulfeldt/Jason Uhlenkott"); MODULE_DESCRIPTION("MC support for Intel 3000 memory hub controllers"); + +module_param(edac_op_state, int, 0444); +MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");