diff options
author | Omer Peleg <omer@cs.technion.ac.il> | 2016-04-20 11:33:11 +0300 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2016-04-20 15:05:56 -0400 |
commit | f5c0c08b1e0976cb493d503108f1b897ce58bc5d (patch) | |
tree | d2d9246fabfaddc9ba5de2b978c84c7dafe77512 /drivers/iommu | |
parent | aa4732406e1290dd18a8d2078977996c152a4be7 (diff) | |
download | op-kernel-dev-f5c0c08b1e0976cb493d503108f1b897ce58bc5d.zip op-kernel-dev-f5c0c08b1e0976cb493d503108f1b897ce58bc5d.tar.gz |
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: Omer Peleg <omer@cs.technion.ac.il>
[mad@cs.technion.ac.il: rebased and reworded the commit message]
Signed-off-by: Adam Morrison <mad@cs.technion.ac.il>
Reviewed-by: Shaohua Li <shli@fb.com>
Reviewed-by: Ben Serebrin <serebrin@google.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a64b6f3..6aacfa4 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3548,7 +3548,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))); |