Skip to content

Commit 96d170f

Browse files
committed
iommu/vt-d: Remove deferred_attach_domain()
The function is now only a wrapper around find_domain(). Remove the function and call find_domain() directly at the call-sites. Fixes: 1ee0186 ("iommu/vt-d: Refactor find_domain() helper") Cc: [email protected] # v5.5 Reviewed-by: Jerry Snitselaar <[email protected]> Acked-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent a11bfde commit 96d170f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,11 +2539,6 @@ static void do_deferred_attach(struct device *dev)
25392539
intel_iommu_attach_device(domain, dev);
25402540
}
25412541

2542-
static struct dmar_domain *deferred_attach_domain(struct device *dev)
2543-
{
2544-
return find_domain(dev);
2545-
}
2546-
25472542
static inline struct device_domain_info *
25482543
dmar_search_domain_by_dev_info(int segment, int bus, int devfn)
25492544
{
@@ -3643,7 +3638,7 @@ static dma_addr_t __intel_map_single(struct device *dev, phys_addr_t paddr,
36433638

36443639
BUG_ON(dir == DMA_NONE);
36453640

3646-
domain = deferred_attach_domain(dev);
3641+
domain = find_domain(dev);
36473642
if (!domain)
36483643
return DMA_MAPPING_ERROR;
36493644

@@ -3863,7 +3858,7 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele
38633858
if (!iommu_need_mapping(dev))
38643859
return dma_direct_map_sg(dev, sglist, nelems, dir, attrs);
38653860

3866-
domain = deferred_attach_domain(dev);
3861+
domain = find_domain(dev);
38673862
if (!domain)
38683863
return 0;
38693864

@@ -3961,7 +3956,7 @@ bounce_map_single(struct device *dev, phys_addr_t paddr, size_t size,
39613956
if (unlikely(attach_deferred(dev)))
39623957
do_deferred_attach(dev);
39633958

3964-
domain = deferred_attach_domain(dev);
3959+
domain = find_domain(dev);
39653960

39663961
if (WARN_ON(dir == DMA_NONE || !domain))
39673962
return DMA_MAPPING_ERROR;

0 commit comments

Comments
 (0)