Skip to content

Commit a33bf8d

Browse files
committed
iommu: Restore iommu_flush_iotlb_all()
This patch restores the iommu_flush_iotlb_all() function. Commit 69e5a17 ("iommu: Remove useless flush from iommu_create_device_direct_mappings()") claims it removed the last call-site, except it did not. There is still at least one caller in drivers/gpu/drm/msm/msm_iommu.c so keep the function around until all call-sites are updated. Cc: Jason Gunthorpe <[email protected]> Fixes: 69e5a17 ("iommu: Remove useless flush from iommu_create_device_direct_mappings()") Acked-by: Will Deacon <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent d14772c commit a33bf8d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/linux/iommu.h

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

856+
static inline void iommu_flush_iotlb_all(struct iommu_domain *domain)
857+
{
858+
if (domain->ops->flush_iotlb_all)
859+
domain->ops->flush_iotlb_all(domain);
860+
}
861+
856862
static inline void iommu_iotlb_sync(struct iommu_domain *domain,
857863
struct iommu_iotlb_gather *iotlb_gather)
858864
{
@@ -1137,6 +1143,10 @@ static inline ssize_t iommu_map_sg(struct iommu_domain *domain,
11371143
return -ENODEV;
11381144
}
11391145

1146+
static inline void iommu_flush_iotlb_all(struct iommu_domain *domain)
1147+
{
1148+
}
1149+
11401150
static inline void iommu_iotlb_sync(struct iommu_domain *domain,
11411151
struct iommu_iotlb_gather *iotlb_gather)
11421152
{

0 commit comments

Comments
 (0)