Lines Matching full:mci
27 #define amd76x_mc_printk(mci, level, fmt, arg...) \ argument
28 edac_mc_chipset_printk(mci, level, "amd76x", fmt, ##arg)
96 * @mci: Memory controller
102 static void amd76x_get_error_info(struct mem_ctl_info *mci, in amd76x_get_error_info() argument
107 pdev = to_pci_dev(mci->pdev); in amd76x_get_error_info()
122 * @mci: Memory controller
130 static int amd76x_process_error_info(struct mem_ctl_info *mci, in amd76x_process_error_info() argument
147 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, in amd76x_process_error_info()
148 mci->csrows[row]->first_page, 0, 0, in amd76x_process_error_info()
150 mci->ctl_name, ""); in amd76x_process_error_info()
162 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, in amd76x_process_error_info()
163 mci->csrows[row]->first_page, 0, 0, in amd76x_process_error_info()
165 mci->ctl_name, ""); in amd76x_process_error_info()
174 * @mci: Memory controller
179 static void amd76x_check(struct mem_ctl_info *mci) in amd76x_check() argument
182 amd76x_get_error_info(mci, &info); in amd76x_check()
183 amd76x_process_error_info(mci, &info, 1); in amd76x_check()
186 static void amd76x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, in amd76x_init_csrows() argument
194 for (index = 0; index < mci->nr_csrows; index++) { in amd76x_init_csrows()
195 csrow = mci->csrows[index]; in amd76x_init_csrows()
236 struct mem_ctl_info *mci; in amd76x_probe1() local
252 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); in amd76x_probe1()
254 if (mci == NULL) in amd76x_probe1()
257 edac_dbg(0, "mci = %p\n", mci); in amd76x_probe1()
258 mci->pdev = &pdev->dev; in amd76x_probe1()
259 mci->mtype_cap = MEM_FLAG_RDDR; in amd76x_probe1()
260 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; in amd76x_probe1()
261 mci->edac_cap = ems_mode ? in amd76x_probe1()
263 mci->mod_name = EDAC_MOD_STR; in amd76x_probe1()
264 mci->ctl_name = amd76x_devs[dev_idx].ctl_name; in amd76x_probe1()
265 mci->dev_name = pci_name(pdev); in amd76x_probe1()
266 mci->edac_check = amd76x_check; in amd76x_probe1()
267 mci->ctl_page_to_phys = NULL; in amd76x_probe1()
269 amd76x_init_csrows(mci, pdev, ems_modes[ems_mode]); in amd76x_probe1()
270 amd76x_get_error_info(mci, &discard); /* clear counters */ in amd76x_probe1()
275 if (edac_mc_add_mc(mci)) { in amd76x_probe1()
296 edac_mc_free(mci); in amd76x_probe1()
314 * Called when the driver is unloaded. Find the matching mci
315 * structure for the device then delete the mci and free the
320 struct mem_ctl_info *mci; in amd76x_remove_one() local
327 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) in amd76x_remove_one()
330 edac_mc_free(mci); in amd76x_remove_one()