Lines Matching refs:seg

32 struct amd_iommu *find_iommu_for_device(int seg, int bdf)  in find_iommu_for_device()  argument
34 struct ivrs_mappings *ivrs_mappings = get_ivrs_mappings(seg); in find_iommu_for_device()
54 seg, PCI_BUS(bdf), PCI_SLOT(bdf), PCI_FUNC(bdf)); in find_iommu_for_device()
72 int get_dma_requestor_id(u16 seg, u16 bdf) in get_dma_requestor_id() argument
74 struct ivrs_mappings *ivrs_mappings = get_ivrs_mappings(seg); in get_dma_requestor_id()
131 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(bus, devfn)); in amd_iommu_setup_domain_device()
143 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_setup_domain_device()
161 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_setup_domain_device()
162 !pci_ats_enabled(iommu->seg, bus, pdev->devfn) ) in amd_iommu_setup_domain_device()
309 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(bus, devfn)); in amd_iommu_disable_domain_device()
317 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_disable_domain_device()
333 pci_ats_device(iommu->seg, bus, devfn) && in amd_iommu_disable_domain_device()
334 pci_ats_enabled(iommu->seg, bus, devfn) ) in amd_iommu_disable_domain_device()
346 iommu = find_iommu_for_device(pdev->seg, bdf); in reassign_device()
351 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
370 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
380 struct ivrs_mappings *ivrs_mappings = get_ivrs_mappings(pdev->seg); in amd_iommu_assign_device()
382 int req_id = get_dma_requestor_id(pdev->seg, bdf); in amd_iommu_assign_device()
473 iommu = find_iommu_for_device(pdev->seg, bdf); in amd_iommu_add_device()
481 pdev->seg, pdev->bus, PCI_SLOT(devfn), in amd_iommu_add_device()
487 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_add_device()
504 iommu = find_iommu_for_device(pdev->seg, bdf); in amd_iommu_remove_device()
509 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_remove_device()
518 static int amd_iommu_group_id(u16 seg, u8 bus, u8 devfn) in amd_iommu_group_id() argument
522 return (bdf < ivrs_bdf_entries) ? get_dma_requestor_id(seg, bdf) : bdf; in amd_iommu_group_id()