Skip to content

Commit 69e5a17

Browse files
jgunthorpejoergroedel
authored andcommitted
iommu: Remove useless flush from iommu_create_device_direct_mappings()
These days iommu_map() does not require external flushing, it always internally handles any required flushes. Since iommu_create_device_direct_mappings() only calls iommu_map(), remove the extra call. Since this is the last call site for iommu_flush_iotlb_all() remove it too. Signed-off-by: Jason Gunthorpe <[email protected]> Reviewed-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent a2f528e commit 69e5a17

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

drivers/iommu/iommu.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,6 @@ static int iommu_create_device_direct_mappings(struct iommu_domain *domain,
11411141
}
11421142

11431143
}
1144-
1145-
if (!list_empty(&mappings) && iommu_is_dma_domain(domain))
1146-
iommu_flush_iotlb_all(domain);
1147-
11481144
out:
11491145
iommu_put_resv_regions(dev, &mappings);
11501146

include/linux/iommu.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -852,12 +852,6 @@ void iommu_set_dma_strict(void);
852852
extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev,
853853
unsigned long iova, int flags);
854854

855-
static inline void iommu_flush_iotlb_all(struct iommu_domain *domain)
856-
{
857-
if (domain->ops->flush_iotlb_all)
858-
domain->ops->flush_iotlb_all(domain);
859-
}
860-
861855
static inline void iommu_iotlb_sync(struct iommu_domain *domain,
862856
struct iommu_iotlb_gather *iotlb_gather)
863857
{
@@ -1141,10 +1135,6 @@ static inline ssize_t iommu_map_sg(struct iommu_domain *domain,
11411135
return -ENODEV;
11421136
}
11431137

1144-
static inline void iommu_flush_iotlb_all(struct iommu_domain *domain)
1145-
{
1146-
}
1147-
11481138
static inline void iommu_iotlb_sync(struct iommu_domain *domain,
11491139
struct iommu_iotlb_gather *iotlb_gather)
11501140
{

0 commit comments

Comments
 (0)