iommu: correct flush_unmaps pfn usage
PATCH 3/7 iommu: correct flush_unmaps pfn usage
From: Omer Peleg <omer-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org>
Change flush_unmaps() to correctly pass iommu_flush_iotlb_psi() dma addresses. (Intel mm and dma have the same size for pages at the moment, but this usage improves consistency.)
[mad-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org: rebased and reworded the commit message]
--- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/intel-iommu.c +2 -1
@@ -3463,7 +3463,8 @@ static void flush_unmaps(struct deferred_flush_data *flush_data)/* On real hardware multiple invalidations are expensive */ if (cap_caching_mode (iommu->cap))iommu_flush_iotlb_psi (iommu, domain, - iova->pfn_lo,iova_size (iova), +mm_to_dma_pfn (iova->pfn_lo), +mm_to_dma_pfn (iova_size (iova)), !freelist,0 );else { mask =ilog2 (mm_to_dma_pfn (iova_size (iova)));
Signature · 1 line
1.9.1
Benjamin Serebrin via iommu
Reviewed-by Ben SerebrinReviewed-by Ben Serebrin <[email protected]>
Looks good.
Quoted 30 lines · Adam Morrison
From: Omer Peleg <omer-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org>
Change
flush_unmaps()to correctly passiommu_flush_iotlb_psi()dma addresses. (Intel mm and dma have the same size for pages at the moment, but this usage improves consistency.)[mad-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org: rebased and reworded the commit message]--- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iommu/intel-iommu.c +2
-2@@ -3463,7 +3463,8 @@ static void flush_unmaps(struct deferred_flush_data *flush_data)/* On real hardware multiple invalidations are expensive */ if (cap_caching_mode (iommu->cap))iommu_flush_iotlb_psi (iommu, domain, - iova->pfn_lo,iova_size (iova), +mm_to_dma_pfn (iova->pfn_lo), +mm_to_dma_pfn (iova_size (iova)), !freelist,0 );else { mask =ilog2 (mm_to_dma_pfn (iova_size (iova))); --1.9.1