H A D | sb_edac.c | 304 struct sbridge_dev { struct 321 struct sbridge_dev *sbridge_dev; member in struct:sbridge_pvt 603 static struct sbridge_dev *get_sbridge_dev(u8 bus) get_sbridge_dev() 605 struct sbridge_dev *sbridge_dev; get_sbridge_dev() local 607 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { get_sbridge_dev() 608 if (sbridge_dev->bus == bus) get_sbridge_dev() 609 return sbridge_dev; get_sbridge_dev() 615 static struct sbridge_dev *alloc_sbridge_dev(u8 bus, alloc_sbridge_dev() 618 struct sbridge_dev *sbridge_dev; alloc_sbridge_dev() local 620 sbridge_dev = kzalloc(sizeof(*sbridge_dev), GFP_KERNEL); alloc_sbridge_dev() 621 if (!sbridge_dev) alloc_sbridge_dev() 624 sbridge_dev->pdev = kzalloc(sizeof(*sbridge_dev->pdev) * table->n_devs, alloc_sbridge_dev() 626 if (!sbridge_dev->pdev) { alloc_sbridge_dev() 627 kfree(sbridge_dev); alloc_sbridge_dev() 631 sbridge_dev->bus = bus; alloc_sbridge_dev() 632 sbridge_dev->n_devs = table->n_devs; alloc_sbridge_dev() 633 list_add_tail(&sbridge_dev->list, &sbridge_edac_list); alloc_sbridge_dev() 635 return sbridge_dev; alloc_sbridge_dev() 638 static void free_sbridge_dev(struct sbridge_dev *sbridge_dev) free_sbridge_dev() argument 640 list_del(&sbridge_dev->list); free_sbridge_dev() 641 kfree(sbridge_dev->pdev); free_sbridge_dev() 642 kfree(sbridge_dev); free_sbridge_dev() 864 pvt->sbridge_dev->source_id = SOURCE_ID(reg); get_dimm_config() 866 pvt->sbridge_dev->node_id = pvt->info.get_node_id(pvt); get_dimm_config() 868 pvt->sbridge_dev->mc, get_dimm_config() 869 pvt->sbridge_dev->node_id, get_dimm_config() 870 pvt->sbridge_dev->source_id); get_dimm_config() 932 pvt->sbridge_dev->mc, i, j, get_dimm_config() 953 pvt->sbridge_dev->source_id, i, j); get_dimm_config() 1123 struct sbridge_dev *sbridge_dev; get_mci_for_node_id() local 1125 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { get_mci_for_node_id() 1126 if (sbridge_dev->node_id == node_id) get_mci_for_node_id() 1127 return sbridge_dev->mci; get_mci_for_node_id() 1211 pvt->sbridge_dev->mc, get_memory_error_data() 1458 static void sbridge_put_devices(struct sbridge_dev *sbridge_dev) sbridge_put_devices() argument 1463 for (i = 0; i < sbridge_dev->n_devs; i++) { sbridge_put_devices() 1464 struct pci_dev *pdev = sbridge_dev->pdev[i]; sbridge_put_devices() 1476 struct sbridge_dev *sbridge_dev, *tmp; sbridge_put_all_devices() local 1478 list_for_each_entry_safe(sbridge_dev, tmp, &sbridge_edac_list, list) { sbridge_put_all_devices() 1479 sbridge_put_devices(sbridge_dev); sbridge_put_all_devices() 1480 free_sbridge_dev(sbridge_dev); sbridge_put_all_devices() 1489 struct sbridge_dev *sbridge_dev; sbridge_get_onedevice() local 1523 sbridge_dev = get_sbridge_dev(bus); sbridge_get_onedevice() 1524 if (!sbridge_dev) { sbridge_get_onedevice() 1525 sbridge_dev = alloc_sbridge_dev(bus, table); sbridge_get_onedevice() 1526 if (!sbridge_dev) { sbridge_get_onedevice() 1533 if (sbridge_dev->pdev[devno]) { sbridge_get_onedevice() 1541 sbridge_dev->pdev[devno] = pdev; sbridge_get_onedevice() 1604 struct sbridge_dev *sbridge_dev) sbridge_mci_bind_devs() 1611 for (i = 0; i < sbridge_dev->n_devs; i++) { sbridge_mci_bind_devs() 1612 pdev = sbridge_dev->pdev[i]; sbridge_mci_bind_devs() 1654 sbridge_dev->bus, sbridge_mci_bind_devs() 1678 struct sbridge_dev *sbridge_dev) ibridge_mci_bind_devs() 1692 for (i = 0; i < sbridge_dev->n_devs; i++) { ibridge_mci_bind_devs() 1693 pdev = sbridge_dev->pdev[i]; ibridge_mci_bind_devs() 1755 sbridge_dev->bus, ibridge_mci_bind_devs() 1784 struct sbridge_dev *sbridge_dev) haswell_mci_bind_devs() 1805 for (i = 0; i < sbridge_dev->n_devs; i++) { haswell_mci_bind_devs() 1806 pdev = sbridge_dev->pdev[i]; haswell_mci_bind_devs() 1862 sbridge_dev->bus, haswell_mci_bind_devs() 1884 struct sbridge_dev *sbridge_dev) broadwell_mci_bind_devs() 1897 for (i = 0; i < sbridge_dev->n_devs; i++) { broadwell_mci_bind_devs() 1898 pdev = sbridge_dev->pdev[i]; broadwell_mci_bind_devs() 1938 sbridge_dev->bus, broadwell_mci_bind_devs() 2239 static void sbridge_unregister_mci(struct sbridge_dev *sbridge_dev) sbridge_unregister_mci() argument 2241 struct mem_ctl_info *mci = sbridge_dev->mci; sbridge_unregister_mci() 2245 edac_dbg(0, "MC: dev = %p\n", &sbridge_dev->pdev[0]->dev); sbridge_unregister_mci() 2254 mci, &sbridge_dev->pdev[0]->dev); sbridge_unregister_mci() 2262 sbridge_dev->mci = NULL; sbridge_unregister_mci() 2265 static int sbridge_register_mci(struct sbridge_dev *sbridge_dev, enum type type) sbridge_register_mci() argument 2270 struct pci_dev *pdev = sbridge_dev->pdev[0]; sbridge_register_mci() 2274 rc = check_if_ecc_is_active(sbridge_dev->bus, type); sbridge_register_mci() 2285 mci = edac_mc_alloc(sbridge_dev->mc, ARRAY_SIZE(layers), layers, sbridge_register_mci() 2297 /* Associate sbridge_dev and mci for future usage */ sbridge_register_mci() 2298 pvt->sbridge_dev = sbridge_dev; sbridge_register_mci() 2299 sbridge_dev->mci = mci; sbridge_register_mci() 2329 rc = ibridge_mci_bind_devs(mci, sbridge_dev); sbridge_register_mci() 2348 rc = sbridge_mci_bind_devs(mci, sbridge_dev); sbridge_register_mci() 2367 rc = haswell_mci_bind_devs(mci, sbridge_dev); sbridge_register_mci() 2386 rc = broadwell_mci_bind_devs(mci, sbridge_dev); sbridge_register_mci() 2411 sbridge_dev->mci = NULL; sbridge_register_mci() 2427 struct sbridge_dev *sbridge_dev; sbridge_probe() local 2467 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { sbridge_probe() 2471 sbridge_dev->mc = mc++; sbridge_probe() 2472 rc = sbridge_register_mci(sbridge_dev, type); sbridge_probe() 2483 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) sbridge_probe() 2484 sbridge_unregister_mci(sbridge_dev); sbridge_probe() 2498 struct sbridge_dev *sbridge_dev; sbridge_remove() local 2517 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) sbridge_remove() 2518 sbridge_unregister_mci(sbridge_dev); sbridge_remove() 1603 sbridge_mci_bind_devs(struct mem_ctl_info *mci, struct sbridge_dev *sbridge_dev) sbridge_mci_bind_devs() argument 1677 ibridge_mci_bind_devs(struct mem_ctl_info *mci, struct sbridge_dev *sbridge_dev) ibridge_mci_bind_devs() argument 1783 haswell_mci_bind_devs(struct mem_ctl_info *mci, struct sbridge_dev *sbridge_dev) haswell_mci_bind_devs() argument 1883 broadwell_mci_bind_devs(struct mem_ctl_info *mci, struct sbridge_dev *sbridge_dev) broadwell_mci_bind_devs() argument
|