@@ -4104,25 +4104,8 @@ static size_t intel_iommu_unmap_pages(struct iommu_domain *domain,
4104
4104
static void intel_iommu_tlb_sync (struct iommu_domain * domain ,
4105
4105
struct iommu_iotlb_gather * gather )
4106
4106
{
4107
- struct dmar_domain * dmar_domain = to_dmar_domain (domain );
4108
- unsigned long iova_pfn = IOVA_PFN (gather -> start );
4109
- size_t size = gather -> end - gather -> start ;
4110
- struct iommu_domain_info * info ;
4111
- unsigned long start_pfn ;
4112
- unsigned long nrpages ;
4113
- unsigned long i ;
4114
-
4115
- nrpages = aligned_nrpages (gather -> start , size );
4116
- start_pfn = mm_to_dma_pfn_start (iova_pfn );
4117
-
4118
- xa_for_each (& dmar_domain -> iommu_array , i , info )
4119
- iommu_flush_iotlb_psi (info -> iommu , dmar_domain ,
4120
- start_pfn , nrpages ,
4121
- list_empty (& gather -> freelist ), 0 );
4122
-
4123
- if (dmar_domain -> nested_parent )
4124
- parent_domain_flush (dmar_domain , start_pfn , nrpages ,
4125
- list_empty (& gather -> freelist ));
4107
+ cache_tag_flush_range (to_dmar_domain (domain ), gather -> start ,
4108
+ gather -> end , list_empty (& gather -> freelist ));
4126
4109
put_pages_list (& gather -> freelist );
4127
4110
}
4128
4111
0 commit comments