Commit f5c0c08b authored by Omer Peleg's avatar Omer Peleg Committed by David Woodhouse

iommu/vt-d: correct flush_unmaps pfn usage

Change flush_unmaps() to correctly pass iommu_flush_iotlb_psi()
dma addresses.  (x86_64 mm and dma have the same size for pages
at the moment, but this usage improves consistency.)
Signed-off-by: default avatarOmer Peleg <omer@cs.technion.ac.il>
[mad@cs.technion.ac.il: rebased and reworded the commit message]
Signed-off-by: default avatarAdam Morrison <mad@cs.technion.ac.il>
Reviewed-by: default avatarShaohua Li <shli@fb.com>
Reviewed-by: default avatarBen Serebrin <serebrin@google.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent aa473240
...@@ -3548,7 +3548,8 @@ static void flush_unmaps(struct deferred_flush_data *flush_data) ...@@ -3548,7 +3548,8 @@ static void flush_unmaps(struct deferred_flush_data *flush_data)
/* On real hardware multiple invalidations are expensive */ /* On real hardware multiple invalidations are expensive */
if (cap_caching_mode(iommu->cap)) if (cap_caching_mode(iommu->cap))
iommu_flush_iotlb_psi(iommu, domain, 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); !freelist, 0);
else { else {
mask = ilog2(mm_to_dma_pfn(iova_size(iova))); mask = ilog2(mm_to_dma_pfn(iova_size(iova)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment