• Home
  • Raw
  • Download

Lines Matching refs:sbridge_dev

352 struct sbridge_dev {  struct
383 struct sbridge_dev *sbridge_dev; member
732 static struct sbridge_dev *get_sbridge_dev(int seg, u8 bus, enum domain dom, in get_sbridge_dev()
734 struct sbridge_dev *prev) in get_sbridge_dev()
736 struct sbridge_dev *sbridge_dev; in get_sbridge_dev() local
744 struct sbridge_dev, list); in get_sbridge_dev()
747 sbridge_dev = list_entry(prev ? prev->list.next in get_sbridge_dev()
748 : sbridge_edac_list.next, struct sbridge_dev, list); in get_sbridge_dev()
750 list_for_each_entry_from(sbridge_dev, &sbridge_edac_list, list) { in get_sbridge_dev()
751 if ((sbridge_dev->seg == seg) && (sbridge_dev->bus == bus) && in get_sbridge_dev()
752 (dom == SOCK || dom == sbridge_dev->dom)) in get_sbridge_dev()
753 return sbridge_dev; in get_sbridge_dev()
759 static struct sbridge_dev *alloc_sbridge_dev(int seg, u8 bus, enum domain dom, in alloc_sbridge_dev()
762 struct sbridge_dev *sbridge_dev; in alloc_sbridge_dev() local
764 sbridge_dev = kzalloc(sizeof(*sbridge_dev), GFP_KERNEL); in alloc_sbridge_dev()
765 if (!sbridge_dev) in alloc_sbridge_dev()
768 sbridge_dev->pdev = kcalloc(table->n_devs_per_imc, in alloc_sbridge_dev()
769 sizeof(*sbridge_dev->pdev), in alloc_sbridge_dev()
771 if (!sbridge_dev->pdev) { in alloc_sbridge_dev()
772 kfree(sbridge_dev); in alloc_sbridge_dev()
776 sbridge_dev->seg = seg; in alloc_sbridge_dev()
777 sbridge_dev->bus = bus; in alloc_sbridge_dev()
778 sbridge_dev->dom = dom; in alloc_sbridge_dev()
779 sbridge_dev->n_devs = table->n_devs_per_imc; in alloc_sbridge_dev()
780 list_add_tail(&sbridge_dev->list, &sbridge_edac_list); in alloc_sbridge_dev()
782 return sbridge_dev; in alloc_sbridge_dev()
785 static void free_sbridge_dev(struct sbridge_dev *sbridge_dev) in free_sbridge_dev() argument
787 list_del(&sbridge_dev->list); in free_sbridge_dev()
788 kfree(sbridge_dev->pdev); in free_sbridge_dev()
789 kfree(sbridge_dev); in free_sbridge_dev()
1577 pvt->sbridge_dev->source_id = SOURCE_ID_KNL(reg); in get_source_id()
1579 pvt->sbridge_dev->source_id = SOURCE_ID(reg); in get_source_id()
1635 pvt->sbridge_dev->source_id, in __populate_dimms()
1636 pvt->sbridge_dev->dom, i); in __populate_dimms()
1657 pvt->sbridge_dev->mc, pvt->sbridge_dev->dom, i, j, in __populate_dimms()
1668 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom, i, j); in __populate_dimms()
1683 pvt->sbridge_dev->node_id = pvt->info.get_node_id(pvt); in get_dimm_config()
1685 pvt->sbridge_dev->mc, in get_dimm_config()
1686 pvt->sbridge_dev->node_id, in get_dimm_config()
1687 pvt->sbridge_dev->source_id); in get_dimm_config()
1918 struct sbridge_dev *sbridge_dev; in get_mci_for_node_id() local
1920 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { in get_mci_for_node_id()
1921 if (sbridge_dev->node_id == node_id && sbridge_dev->dom == ha) in get_mci_for_node_id()
1922 return sbridge_dev->mci; in get_mci_for_node_id()
2006 pvt->sbridge_dev->mc, in get_memory_error_data()
2303 static void sbridge_put_devices(struct sbridge_dev *sbridge_dev) in sbridge_put_devices() argument
2308 for (i = 0; i < sbridge_dev->n_devs; i++) { in sbridge_put_devices()
2309 struct pci_dev *pdev = sbridge_dev->pdev[i]; in sbridge_put_devices()
2321 struct sbridge_dev *sbridge_dev, *tmp; in sbridge_put_all_devices() local
2323 list_for_each_entry_safe(sbridge_dev, tmp, &sbridge_edac_list, list) { in sbridge_put_all_devices()
2324 sbridge_put_devices(sbridge_dev); in sbridge_put_all_devices()
2325 free_sbridge_dev(sbridge_dev); in sbridge_put_all_devices()
2335 struct sbridge_dev *sbridge_dev = NULL; in sbridge_get_onedevice() local
2373 sbridge_dev = get_sbridge_dev(seg, bus, dev_descr->dom, in sbridge_get_onedevice()
2374 multi_bus, sbridge_dev); in sbridge_get_onedevice()
2375 if (!sbridge_dev) { in sbridge_get_onedevice()
2387 sbridge_dev = alloc_sbridge_dev(seg, bus, dev_descr->dom, table); in sbridge_get_onedevice()
2388 if (!sbridge_dev) { in sbridge_get_onedevice()
2395 if (sbridge_dev->pdev[sbridge_dev->i_devs]) { in sbridge_get_onedevice()
2403 sbridge_dev->pdev[sbridge_dev->i_devs++] = pdev; in sbridge_get_onedevice()
2489 struct sbridge_dev *sbridge_dev) in sbridge_mci_bind_devs() argument
2496 for (i = 0; i < sbridge_dev->n_devs; i++) { in sbridge_mci_bind_devs()
2497 pdev = sbridge_dev->pdev[i]; in sbridge_mci_bind_devs()
2539 sbridge_dev->bus, in sbridge_mci_bind_devs()
2563 struct sbridge_dev *sbridge_dev) in ibridge_mci_bind_devs() argument
2570 for (i = 0; i < sbridge_dev->n_devs; i++) { in ibridge_mci_bind_devs()
2571 pdev = sbridge_dev->pdev[i]; in ibridge_mci_bind_devs()
2622 sbridge_dev->bus, in ibridge_mci_bind_devs()
2649 struct sbridge_dev *sbridge_dev) in haswell_mci_bind_devs() argument
2663 for (i = 0; i < sbridge_dev->n_devs; i++) { in haswell_mci_bind_devs()
2664 pdev = sbridge_dev->pdev[i]; in haswell_mci_bind_devs()
2713 sbridge_dev->bus, in haswell_mci_bind_devs()
2734 struct sbridge_dev *sbridge_dev) in broadwell_mci_bind_devs() argument
2748 for (i = 0; i < sbridge_dev->n_devs; i++) { in broadwell_mci_bind_devs()
2749 pdev = sbridge_dev->pdev[i]; in broadwell_mci_bind_devs()
2794 sbridge_dev->bus, in broadwell_mci_bind_devs()
2815 struct sbridge_dev *sbridge_dev) in knl_mci_bind_devs() argument
2824 for (i = 0; i < sbridge_dev->n_devs; i++) { in knl_mci_bind_devs()
2825 pdev = sbridge_dev->pdev[i]; in knl_mci_bind_devs()
3200 static void sbridge_unregister_mci(struct sbridge_dev *sbridge_dev) in sbridge_unregister_mci() argument
3202 struct mem_ctl_info *mci = sbridge_dev->mci; in sbridge_unregister_mci()
3206 edac_dbg(0, "MC: dev = %p\n", &sbridge_dev->pdev[0]->dev); in sbridge_unregister_mci()
3215 mci, &sbridge_dev->pdev[0]->dev); in sbridge_unregister_mci()
3223 sbridge_dev->mci = NULL; in sbridge_unregister_mci()
3226 static int sbridge_register_mci(struct sbridge_dev *sbridge_dev, enum type type) in sbridge_register_mci() argument
3231 struct pci_dev *pdev = sbridge_dev->pdev[0]; in sbridge_register_mci()
3242 mci = edac_mc_alloc(sbridge_dev->mc, ARRAY_SIZE(layers), layers, in sbridge_register_mci()
3255 pvt->sbridge_dev = sbridge_dev; in sbridge_register_mci()
3256 sbridge_dev->mci = mci; in sbridge_register_mci()
3286 rc = ibridge_mci_bind_devs(mci, sbridge_dev); in sbridge_register_mci()
3291 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom); in sbridge_register_mci()
3311 rc = sbridge_mci_bind_devs(mci, sbridge_dev); in sbridge_register_mci()
3316 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom); in sbridge_register_mci()
3336 rc = haswell_mci_bind_devs(mci, sbridge_dev); in sbridge_register_mci()
3341 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom); in sbridge_register_mci()
3361 rc = broadwell_mci_bind_devs(mci, sbridge_dev); in sbridge_register_mci()
3366 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom); in sbridge_register_mci()
3385 rc = knl_mci_bind_devs(mci, sbridge_dev); in sbridge_register_mci()
3390 pvt->sbridge_dev->source_id, pvt->sbridge_dev->dom); in sbridge_register_mci()
3423 sbridge_dev->mci = NULL; in sbridge_register_mci()
3451 struct sbridge_dev *sbridge_dev; in sbridge_probe() local
3464 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { in sbridge_probe()
3468 sbridge_dev->mc = mc++; in sbridge_probe()
3469 rc = sbridge_register_mci(sbridge_dev, ptable->type); in sbridge_probe()
3479 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) in sbridge_probe()
3480 sbridge_unregister_mci(sbridge_dev); in sbridge_probe()
3493 struct sbridge_dev *sbridge_dev; in sbridge_remove() local
3497 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) in sbridge_remove()
3498 sbridge_unregister_mci(sbridge_dev); in sbridge_remove()