aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index d6a857397ec3..ee48fd073140 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2815,11 +2815,18 @@ static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist,
2815 /* free page tables */ 2815 /* free page tables */
2816 dma_pte_free_pagetable(domain, start_pfn, last_pfn); 2816 dma_pte_free_pagetable(domain, start_pfn, last_pfn);
2817 2817
2818 iommu_flush_iotlb_psi(iommu, domain->id, start_pfn, 2818 if (intel_iommu_strict) {
2819 (last_pfn - start_pfn + 1)); 2819 iommu_flush_iotlb_psi(iommu, domain->id, start_pfn,
2820 2820 last_pfn - start_pfn + 1);
2821 /* free iova */ 2821 /* free iova */
2822 __free_iova(&domain->iovad, iova); 2822 __free_iova(&domain->iovad, iova);
2823 } else {
2824 add_unmap(domain, iova);
2825 /*
2826 * queue up the release of the unmap to save the 1/6th of the
2827 * cpu used up by the iotlb flush operation...
2828 */
2829 }
2823} 2830}
2824 2831
2825static int intel_nontranslate_map_sg(struct device *hddev, 2832static int intel_nontranslate_map_sg(struct device *hddev,