Lines Matching refs:pci_seg
141 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in get_dev_table() local
143 BUG_ON(pci_seg == NULL); in get_dev_table()
144 dev_table = pci_seg->dev_table; in get_dev_table()
170 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in amd_iommu_set_rlookup_table() local
172 pci_seg->rlookup_table[devid] = iommu; in amd_iommu_set_rlookup_table()
177 struct amd_iommu_pci_seg *pci_seg; in __rlookup_amd_iommu() local
179 for_each_pci_segment(pci_seg) { in __rlookup_amd_iommu()
180 if (pci_seg->id == seg) in __rlookup_amd_iommu()
181 return pci_seg->rlookup_table[devid]; in __rlookup_amd_iommu()
199 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in alloc_dev_data() local
209 llist_add(&dev_data->dev_data_list, &pci_seg->dev_data_list); in alloc_dev_data()
217 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in search_dev_data() local
219 if (llist_empty(&pci_seg->dev_data_list)) in search_dev_data()
222 node = pci_seg->dev_data_list.first; in search_dev_data()
266 clone_alias(pdev, iommu->pci_seg->alias_table[pci_dev_id(pdev)], NULL); in clone_aliases()
274 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in setup_aliases() local
285 ivrs_alias = pci_seg->alias_table[pci_dev_id(pdev)]; in setup_aliases()
481 struct amd_iommu_pci_seg *pci_seg; in check_device() local
498 pci_seg = iommu->pci_seg; in check_device()
499 if (devid > pci_seg->last_bdf) in check_device()
543 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in iommu_ignore_device() local
552 pci_seg->rlookup_table[devid] = NULL; in iommu_ignore_device()
611 pdev = pci_get_domain_bus_and_slot(iommu->pci_seg->id, PCI_BUS_NUM(devid), in amd_iommu_report_rmp_hw_error()
623 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in amd_iommu_report_rmp_hw_error()
644 pdev = pci_get_domain_bus_and_slot(iommu->pci_seg->id, PCI_BUS_NUM(devid), in amd_iommu_report_rmp_fault()
656 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in amd_iommu_report_rmp_fault()
677 pdev = pci_get_domain_bus_and_slot(iommu->pci_seg->id, PCI_BUS_NUM(devid), in amd_iommu_report_page_fault()
693 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), in amd_iommu_report_page_fault()
712 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in amd_iommu_report_page_fault()
756 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
763 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
768 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
781 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
786 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
799 iommu->pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), in iommu_print_event()
1278 u16 last_bdf = iommu->pci_seg->last_bdf; in amd_iommu_flush_dte_all()
1293 u16 last_bdf = iommu->pci_seg->last_bdf; in amd_iommu_flush_tlb_all()
1338 u16 last_bdf = iommu->pci_seg->last_bdf; in amd_iommu_flush_irt_all()
1390 struct amd_iommu_pci_seg *pci_seg; in device_flush_dte() local
1405 pci_seg = iommu->pci_seg; in device_flush_dte()
1406 alias = pci_seg->alias_table[dev_data->devid]; in device_flush_dte()
2689 struct amd_iommu_pci_seg *pci_seg; in amd_iommu_get_resv_regions() local
2698 pci_seg = iommu->pci_seg; in amd_iommu_get_resv_regions()
2700 list_for_each_entry(entry, &pci_seg->unity_map, list) { in amd_iommu_get_resv_regions()
2927 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in get_irq_table() local
2929 if (WARN_ONCE(!pci_seg->rlookup_table[devid], in get_irq_table()
2931 __func__, pci_seg->id, devid)) in get_irq_table()
2934 table = pci_seg->irq_lookup_table[devid]; in get_irq_table()
2936 __func__, pci_seg->id, devid)) in get_irq_table()
2969 struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; in set_remap_table_entry() local
2971 pci_seg->irq_lookup_table[devid] = table; in set_remap_table_entry()
2980 struct amd_iommu_pci_seg *pci_seg; in set_remap_table_entry_alias() local
2986 pci_seg = iommu->pci_seg; in set_remap_table_entry_alias()
2987 pci_seg->irq_lookup_table[alias] = table; in set_remap_table_entry_alias()
2989 iommu_flush_dte(pci_seg->rlookup_table[alias], alias); in set_remap_table_entry_alias()
2999 struct amd_iommu_pci_seg *pci_seg; in alloc_irq_table() local
3005 pci_seg = iommu->pci_seg; in alloc_irq_table()
3006 table = pci_seg->irq_lookup_table[devid]; in alloc_irq_table()
3010 alias = pci_seg->alias_table[devid]; in alloc_irq_table()
3011 table = pci_seg->irq_lookup_table[alias]; in alloc_irq_table()
3025 table = pci_seg->irq_lookup_table[devid]; in alloc_irq_table()
3029 table = pci_seg->irq_lookup_table[alias]; in alloc_irq_table()