e7xxx_edac.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. /*
  2. * Intel e7xxx Memory Controller kernel module
  3. * (C) 2003 Linux Networx (http://lnxi.com)
  4. * This file may be distributed under the terms of the
  5. * GNU General Public License.
  6. *
  7. * See "enum e7xxx_chips" below for supported chipsets
  8. *
  9. * Written by Thayne Harbaugh
  10. * Based on work by Dan Hollis <goemon at anime dot net> and others.
  11. * http://www.anime.net/~goemon/linux-ecc/
  12. *
  13. * Contributors:
  14. * Eric Biederman (Linux Networx)
  15. * Tom Zimmerman (Linux Networx)
  16. * Jim Garlick (Lawrence Livermore National Labs)
  17. * Dave Peterson (Lawrence Livermore National Labs)
  18. * That One Guy (Some other place)
  19. * Wang Zhenyu (intel.com)
  20. *
  21. * $Id: edac_e7xxx.c,v 1.5.2.9 2005/10/05 00:43:44 dsp_llnl Exp $
  22. *
  23. */
  24. #include <linux/module.h>
  25. #include <linux/init.h>
  26. #include <linux/pci.h>
  27. #include <linux/pci_ids.h>
  28. #include <linux/slab.h>
  29. #include <linux/edac.h>
  30. #include "edac_core.h"
  31. #define E7XXX_REVISION " Ver: 2.0.2 " __DATE__
  32. #define EDAC_MOD_STR "e7xxx_edac"
  33. #define e7xxx_printk(level, fmt, arg...) \
  34. edac_printk(level, "e7xxx", fmt, ##arg)
  35. #define e7xxx_mc_printk(mci, level, fmt, arg...) \
  36. edac_mc_chipset_printk(mci, level, "e7xxx", fmt, ##arg)
  37. #ifndef PCI_DEVICE_ID_INTEL_7205_0
  38. #define PCI_DEVICE_ID_INTEL_7205_0 0x255d
  39. #endif /* PCI_DEVICE_ID_INTEL_7205_0 */
  40. #ifndef PCI_DEVICE_ID_INTEL_7205_1_ERR
  41. #define PCI_DEVICE_ID_INTEL_7205_1_ERR 0x2551
  42. #endif /* PCI_DEVICE_ID_INTEL_7205_1_ERR */
  43. #ifndef PCI_DEVICE_ID_INTEL_7500_0
  44. #define PCI_DEVICE_ID_INTEL_7500_0 0x2540
  45. #endif /* PCI_DEVICE_ID_INTEL_7500_0 */
  46. #ifndef PCI_DEVICE_ID_INTEL_7500_1_ERR
  47. #define PCI_DEVICE_ID_INTEL_7500_1_ERR 0x2541
  48. #endif /* PCI_DEVICE_ID_INTEL_7500_1_ERR */
  49. #ifndef PCI_DEVICE_ID_INTEL_7501_0
  50. #define PCI_DEVICE_ID_INTEL_7501_0 0x254c
  51. #endif /* PCI_DEVICE_ID_INTEL_7501_0 */
  52. #ifndef PCI_DEVICE_ID_INTEL_7501_1_ERR
  53. #define PCI_DEVICE_ID_INTEL_7501_1_ERR 0x2541
  54. #endif /* PCI_DEVICE_ID_INTEL_7501_1_ERR */
  55. #ifndef PCI_DEVICE_ID_INTEL_7505_0
  56. #define PCI_DEVICE_ID_INTEL_7505_0 0x2550
  57. #endif /* PCI_DEVICE_ID_INTEL_7505_0 */
  58. #ifndef PCI_DEVICE_ID_INTEL_7505_1_ERR
  59. #define PCI_DEVICE_ID_INTEL_7505_1_ERR 0x2551
  60. #endif /* PCI_DEVICE_ID_INTEL_7505_1_ERR */
  61. #define E7XXX_NR_CSROWS 8 /* number of csrows */
  62. #define E7XXX_NR_DIMMS 8 /* FIXME - is this correct? */
  63. /* E7XXX register addresses - device 0 function 0 */
  64. #define E7XXX_DRB 0x60 /* DRAM row boundary register (8b) */
  65. #define E7XXX_DRA 0x70 /* DRAM row attribute register (8b) */
  66. /*
  67. * 31 Device width row 7 0=x8 1=x4
  68. * 27 Device width row 6
  69. * 23 Device width row 5
  70. * 19 Device width row 4
  71. * 15 Device width row 3
  72. * 11 Device width row 2
  73. * 7 Device width row 1
  74. * 3 Device width row 0
  75. */
  76. #define E7XXX_DRC 0x7C /* DRAM controller mode reg (32b) */
  77. /*
  78. * 22 Number channels 0=1,1=2
  79. * 19:18 DRB Granularity 32/64MB
  80. */
  81. #define E7XXX_TOLM 0xC4 /* DRAM top of low memory reg (16b) */
  82. #define E7XXX_REMAPBASE 0xC6 /* DRAM remap base address reg (16b) */
  83. #define E7XXX_REMAPLIMIT 0xC8 /* DRAM remap limit address reg (16b) */
  84. /* E7XXX register addresses - device 0 function 1 */
  85. #define E7XXX_DRAM_FERR 0x80 /* DRAM first error register (8b) */
  86. #define E7XXX_DRAM_NERR 0x82 /* DRAM next error register (8b) */
  87. #define E7XXX_DRAM_CELOG_ADD 0xA0 /* DRAM first correctable memory */
  88. /* error address register (32b) */
  89. /*
  90. * 31:28 Reserved
  91. * 27:6 CE address (4k block 33:12)
  92. * 5:0 Reserved
  93. */
  94. #define E7XXX_DRAM_UELOG_ADD 0xB0 /* DRAM first uncorrectable memory */
  95. /* error address register (32b) */
  96. /*
  97. * 31:28 Reserved
  98. * 27:6 CE address (4k block 33:12)
  99. * 5:0 Reserved
  100. */
  101. #define E7XXX_DRAM_CELOG_SYNDROME 0xD0 /* DRAM first correctable memory */
  102. /* error syndrome register (16b) */
  103. enum e7xxx_chips {
  104. E7500 = 0,
  105. E7501,
  106. E7505,
  107. E7205,
  108. };
  109. struct e7xxx_pvt {
  110. struct pci_dev *bridge_ck;
  111. u32 tolm;
  112. u32 remapbase;
  113. u32 remaplimit;
  114. const struct e7xxx_dev_info *dev_info;
  115. };
  116. struct e7xxx_dev_info {
  117. u16 err_dev;
  118. const char *ctl_name;
  119. };
  120. struct e7xxx_error_info {
  121. u8 dram_ferr;
  122. u8 dram_nerr;
  123. u32 dram_celog_add;
  124. u16 dram_celog_syndrome;
  125. u32 dram_uelog_add;
  126. };
  127. static struct edac_pci_ctl_info *e7xxx_pci;
  128. static const struct e7xxx_dev_info e7xxx_devs[] = {
  129. [E7500] = {
  130. .err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR,
  131. .ctl_name = "E7500"},
  132. [E7501] = {
  133. .err_dev = PCI_DEVICE_ID_INTEL_7501_1_ERR,
  134. .ctl_name = "E7501"},
  135. [E7505] = {
  136. .err_dev = PCI_DEVICE_ID_INTEL_7505_1_ERR,
  137. .ctl_name = "E7505"},
  138. [E7205] = {
  139. .err_dev = PCI_DEVICE_ID_INTEL_7205_1_ERR,
  140. .ctl_name = "E7205"},
  141. };
  142. /* FIXME - is this valid for both SECDED and S4ECD4ED? */
  143. static inline int e7xxx_find_channel(u16 syndrome)
  144. {
  145. debugf3("%s()\n", __func__);
  146. if ((syndrome & 0xff00) == 0)
  147. return 0;
  148. if ((syndrome & 0x00ff) == 0)
  149. return 1;
  150. if ((syndrome & 0xf000) == 0 || (syndrome & 0x0f00) == 0)
  151. return 0;
  152. return 1;
  153. }
  154. static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci,
  155. unsigned long page)
  156. {
  157. u32 remap;
  158. struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info;
  159. debugf3("%s()\n", __func__);
  160. if ((page < pvt->tolm) ||
  161. ((page >= 0x100000) && (page < pvt->remapbase)))
  162. return page;
  163. remap = (page - pvt->tolm) + pvt->remapbase;
  164. if (remap < pvt->remaplimit)
  165. return remap;
  166. e7xxx_printk(KERN_ERR, "Invalid page %lx - out of range\n", page);
  167. return pvt->tolm - 1;
  168. }
  169. static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
  170. {
  171. u32 error_1b, page;
  172. u16 syndrome;
  173. int row;
  174. int channel;
  175. debugf3("%s()\n", __func__);
  176. /* read the error address */
  177. error_1b = info->dram_celog_add;
  178. /* FIXME - should use PAGE_SHIFT */
  179. page = error_1b >> 6; /* convert the address to 4k page */
  180. /* read the syndrome */
  181. syndrome = info->dram_celog_syndrome;
  182. /* FIXME - check for -1 */
  183. row = edac_mc_find_csrow_by_page(mci, page);
  184. /* convert syndrome to channel */
  185. channel = e7xxx_find_channel(syndrome);
  186. edac_mc_handle_ce(mci, page, 0, syndrome, row, channel, "e7xxx CE");
  187. }
  188. static void process_ce_no_info(struct mem_ctl_info *mci)
  189. {
  190. debugf3("%s()\n", __func__);
  191. edac_mc_handle_ce_no_info(mci, "e7xxx CE log register overflow");
  192. }
  193. static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
  194. {
  195. u32 error_2b, block_page;
  196. int row;
  197. debugf3("%s()\n", __func__);
  198. /* read the error address */
  199. error_2b = info->dram_uelog_add;
  200. /* FIXME - should use PAGE_SHIFT */
  201. block_page = error_2b >> 6; /* convert to 4k address */
  202. row = edac_mc_find_csrow_by_page(mci, block_page);
  203. edac_mc_handle_ue(mci, block_page, 0, row, "e7xxx UE");
  204. }
  205. static void process_ue_no_info(struct mem_ctl_info *mci)
  206. {
  207. debugf3("%s()\n", __func__);
  208. edac_mc_handle_ue_no_info(mci, "e7xxx UE log register overflow");
  209. }
  210. static void e7xxx_get_error_info(struct mem_ctl_info *mci,
  211. struct e7xxx_error_info *info)
  212. {
  213. struct e7xxx_pvt *pvt;
  214. pvt = (struct e7xxx_pvt *)mci->pvt_info;
  215. pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_FERR, &info->dram_ferr);
  216. pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_NERR, &info->dram_nerr);
  217. if ((info->dram_ferr & 1) || (info->dram_nerr & 1)) {
  218. pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_CELOG_ADD,
  219. &info->dram_celog_add);
  220. pci_read_config_word(pvt->bridge_ck,
  221. E7XXX_DRAM_CELOG_SYNDROME,
  222. &info->dram_celog_syndrome);
  223. }
  224. if ((info->dram_ferr & 2) || (info->dram_nerr & 2))
  225. pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_UELOG_ADD,
  226. &info->dram_uelog_add);
  227. if (info->dram_ferr & 3)
  228. pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_FERR, 0x03, 0x03);
  229. if (info->dram_nerr & 3)
  230. pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_NERR, 0x03, 0x03);
  231. }
  232. static int e7xxx_process_error_info(struct mem_ctl_info *mci,
  233. struct e7xxx_error_info *info,
  234. int handle_errors)
  235. {
  236. int error_found;
  237. error_found = 0;
  238. /* decode and report errors */
  239. if (info->dram_ferr & 1) { /* check first error correctable */
  240. error_found = 1;
  241. if (handle_errors)
  242. process_ce(mci, info);
  243. }
  244. if (info->dram_ferr & 2) { /* check first error uncorrectable */
  245. error_found = 1;
  246. if (handle_errors)
  247. process_ue(mci, info);
  248. }
  249. if (info->dram_nerr & 1) { /* check next error correctable */
  250. error_found = 1;
  251. if (handle_errors) {
  252. if (info->dram_ferr & 1)
  253. process_ce_no_info(mci);
  254. else
  255. process_ce(mci, info);
  256. }
  257. }
  258. if (info->dram_nerr & 2) { /* check next error uncorrectable */
  259. error_found = 1;
  260. if (handle_errors) {
  261. if (info->dram_ferr & 2)
  262. process_ue_no_info(mci);
  263. else
  264. process_ue(mci, info);
  265. }
  266. }
  267. return error_found;
  268. }
  269. static void e7xxx_check(struct mem_ctl_info *mci)
  270. {
  271. struct e7xxx_error_info info;
  272. debugf3("%s()\n", __func__);
  273. e7xxx_get_error_info(mci, &info);
  274. e7xxx_process_error_info(mci, &info, 1);
  275. }
  276. /* Return 1 if dual channel mode is active. Else return 0. */
  277. static inline int dual_channel_active(u32 drc, int dev_idx)
  278. {
  279. return (dev_idx == E7501) ? ((drc >> 22) & 0x1) : 1;
  280. }
  281. /* Return DRB granularity (0=32mb, 1=64mb). */
  282. static inline int drb_granularity(u32 drc, int dev_idx)
  283. {
  284. /* only e7501 can be single channel */
  285. return (dev_idx == E7501) ? ((drc >> 18) & 0x3) : 1;
  286. }
  287. static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
  288. int dev_idx, u32 drc)
  289. {
  290. unsigned long last_cumul_size;
  291. int index;
  292. u8 value;
  293. u32 dra, cumul_size;
  294. int drc_chan, drc_drbg, drc_ddim, mem_dev;
  295. struct csrow_info *csrow;
  296. pci_read_config_dword(pdev, E7XXX_DRA, &dra);
  297. drc_chan = dual_channel_active(drc, dev_idx);
  298. drc_drbg = drb_granularity(drc, dev_idx);
  299. drc_ddim = (drc >> 20) & 0x3;
  300. last_cumul_size = 0;
  301. /* The dram row boundary (DRB) reg values are boundary address
  302. * for each DRAM row with a granularity of 32 or 64MB (single/dual
  303. * channel operation). DRB regs are cumulative; therefore DRB7 will
  304. * contain the total memory contained in all eight rows.
  305. */
  306. for (index = 0; index < mci->nr_csrows; index++) {
  307. /* mem_dev 0=x8, 1=x4 */
  308. mem_dev = (dra >> (index * 4 + 3)) & 0x1;
  309. csrow = &mci->csrows[index];
  310. pci_read_config_byte(pdev, E7XXX_DRB + index, &value);
  311. /* convert a 64 or 32 MiB DRB to a page size. */
  312. cumul_size = value << (25 + drc_drbg - PAGE_SHIFT);
  313. debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index,
  314. cumul_size);
  315. if (cumul_size == last_cumul_size)
  316. continue; /* not populated */
  317. csrow->first_page = last_cumul_size;
  318. csrow->last_page = cumul_size - 1;
  319. csrow->nr_pages = cumul_size - last_cumul_size;
  320. last_cumul_size = cumul_size;
  321. csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */
  322. csrow->mtype = MEM_RDDR; /* only one type supported */
  323. csrow->dtype = mem_dev ? DEV_X4 : DEV_X8;
  324. /*
  325. * if single channel or x8 devices then SECDED
  326. * if dual channel and x4 then S4ECD4ED
  327. */
  328. if (drc_ddim) {
  329. if (drc_chan && mem_dev) {
  330. csrow->edac_mode = EDAC_S4ECD4ED;
  331. mci->edac_cap |= EDAC_FLAG_S4ECD4ED;
  332. } else {
  333. csrow->edac_mode = EDAC_SECDED;
  334. mci->edac_cap |= EDAC_FLAG_SECDED;
  335. }
  336. } else
  337. csrow->edac_mode = EDAC_NONE;
  338. }
  339. }
  340. static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
  341. {
  342. u16 pci_data;
  343. struct mem_ctl_info *mci = NULL;
  344. struct e7xxx_pvt *pvt = NULL;
  345. u32 drc;
  346. int drc_chan;
  347. struct e7xxx_error_info discard;
  348. debugf0("%s(): mci\n", __func__);
  349. pci_read_config_dword(pdev, E7XXX_DRC, &drc);
  350. drc_chan = dual_channel_active(drc, dev_idx);
  351. mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1, 0);
  352. if (mci == NULL)
  353. return -ENOMEM;
  354. debugf3("%s(): init mci\n", __func__);
  355. mci->mtype_cap = MEM_FLAG_RDDR;
  356. mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED |
  357. EDAC_FLAG_S4ECD4ED;
  358. /* FIXME - what if different memory types are in different csrows? */
  359. mci->mod_name = EDAC_MOD_STR;
  360. mci->mod_ver = E7XXX_REVISION;
  361. mci->dev = &pdev->dev;
  362. debugf3("%s(): init pvt\n", __func__);
  363. pvt = (struct e7xxx_pvt *)mci->pvt_info;
  364. pvt->dev_info = &e7xxx_devs[dev_idx];
  365. pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
  366. pvt->dev_info->err_dev, pvt->bridge_ck);
  367. if (!pvt->bridge_ck) {
  368. e7xxx_printk(KERN_ERR, "error reporting device not found:"
  369. "vendor %x device 0x%x (broken BIOS?)\n",
  370. PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev);
  371. goto fail0;
  372. }
  373. debugf3("%s(): more mci init\n", __func__);
  374. mci->ctl_name = pvt->dev_info->ctl_name;
  375. mci->dev_name = pci_name(pdev);
  376. mci->edac_check = e7xxx_check;
  377. mci->ctl_page_to_phys = ctl_page_to_phys;
  378. e7xxx_init_csrows(mci, pdev, dev_idx, drc);
  379. mci->edac_cap |= EDAC_FLAG_NONE;
  380. debugf3("%s(): tolm, remapbase, remaplimit\n", __func__);
  381. /* load the top of low memory, remap base, and remap limit vars */
  382. pci_read_config_word(pdev, E7XXX_TOLM, &pci_data);
  383. pvt->tolm = ((u32) pci_data) << 4;
  384. pci_read_config_word(pdev, E7XXX_REMAPBASE, &pci_data);
  385. pvt->remapbase = ((u32) pci_data) << 14;
  386. pci_read_config_word(pdev, E7XXX_REMAPLIMIT, &pci_data);
  387. pvt->remaplimit = ((u32) pci_data) << 14;
  388. e7xxx_printk(KERN_INFO,
  389. "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm,
  390. pvt->remapbase, pvt->remaplimit);
  391. /* clear any pending errors, or initial state bits */
  392. e7xxx_get_error_info(mci, &discard);
  393. /* Here we assume that we will never see multiple instances of this
  394. * type of memory controller. The ID is therefore hardcoded to 0.
  395. */
  396. if (edac_mc_add_mc(mci)) {
  397. debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
  398. goto fail1;
  399. }
  400. /* allocating generic PCI control info */
  401. e7xxx_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR);
  402. if (!e7xxx_pci) {
  403. printk(KERN_WARNING
  404. "%s(): Unable to create PCI control\n",
  405. __func__);
  406. printk(KERN_WARNING
  407. "%s(): PCI error report via EDAC not setup\n",
  408. __func__);
  409. }
  410. /* get this far and it's successful */
  411. debugf3("%s(): success\n", __func__);
  412. return 0;
  413. fail1:
  414. pci_dev_put(pvt->bridge_ck);
  415. fail0:
  416. edac_mc_free(mci);
  417. return -ENODEV;
  418. }
  419. /* returns count (>= 0), or negative on error */
  420. static int __devinit e7xxx_init_one(struct pci_dev *pdev,
  421. const struct pci_device_id *ent)
  422. {
  423. debugf0("%s()\n", __func__);
  424. /* wake up and enable device */
  425. return pci_enable_device(pdev) ?
  426. -EIO : e7xxx_probe1(pdev, ent->driver_data);
  427. }
  428. static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
  429. {
  430. struct mem_ctl_info *mci;
  431. struct e7xxx_pvt *pvt;
  432. debugf0("%s()\n", __func__);
  433. if (e7xxx_pci)
  434. edac_pci_release_generic_ctl(e7xxx_pci);
  435. if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL)
  436. return;
  437. pvt = (struct e7xxx_pvt *)mci->pvt_info;
  438. pci_dev_put(pvt->bridge_ck);
  439. edac_mc_free(mci);
  440. }
  441. static const struct pci_device_id e7xxx_pci_tbl[] __devinitdata = {
  442. {
  443. PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
  444. E7205},
  445. {
  446. PCI_VEND_DEV(INTEL, 7500_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
  447. E7500},
  448. {
  449. PCI_VEND_DEV(INTEL, 7501_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
  450. E7501},
  451. {
  452. PCI_VEND_DEV(INTEL, 7505_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
  453. E7505},
  454. {
  455. 0,
  456. } /* 0 terminated list. */
  457. };
  458. MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl);
  459. static struct pci_driver e7xxx_driver = {
  460. .name = EDAC_MOD_STR,
  461. .probe = e7xxx_init_one,
  462. .remove = __devexit_p(e7xxx_remove_one),
  463. .id_table = e7xxx_pci_tbl,
  464. };
  465. static int __init e7xxx_init(void)
  466. {
  467. /* Ensure that the OPSTATE is set correctly for POLL or NMI */
  468. opstate_init();
  469. return pci_register_driver(&e7xxx_driver);
  470. }
  471. static void __exit e7xxx_exit(void)
  472. {
  473. pci_unregister_driver(&e7xxx_driver);
  474. }
  475. module_init(e7xxx_init);
  476. module_exit(e7xxx_exit);
  477. MODULE_LICENSE("GPL");
  478. MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh et al\n"
  479. "Based on.work by Dan Hollis et al");
  480. MODULE_DESCRIPTION("MC support for Intel e7xxx memory controllers");
  481. module_param(edac_op_state, int, 0444);
  482. MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");