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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index edd39d348a98..40eae2097aca 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -764,12 +764,12 @@ static struct dma_pte *dma_pfn_level_pte(struct dmar_domain *domain,
764} 764}
765 765
766/* clear one page's page table */ 766/* clear one page's page table */
767static void dma_pte_clear_one(struct dmar_domain *domain, u64 addr) 767static void dma_pte_clear_one(struct dmar_domain *domain, unsigned long pfn)
768{ 768{
769 struct dma_pte *pte = NULL; 769 struct dma_pte *pte = NULL;
770 770
771 /* get last level pte */ 771 /* get last level pte */
772 pte = dma_pfn_level_pte(domain, addr >> VTD_PAGE_SHIFT, 1); 772 pte = dma_pfn_level_pte(domain, pfn, 1);
773 773
774 if (pte) { 774 if (pte) {
775 dma_clear_pte(pte); 775 dma_clear_pte(pte);
@@ -792,7 +792,7 @@ static void dma_pte_clear_range(struct dmar_domain *domain, u64 start, u64 end)
792 792
793 /* we don't need lock here, nobody else touches the iova range */ 793 /* we don't need lock here, nobody else touches the iova range */
794 while (npages--) { 794 while (npages--) {
795 dma_pte_clear_one(domain, start); 795 dma_pte_clear_one(domain, start >> VTD_PAGE_SHIFT);
796 start += VTD_PAGE_SIZE; 796 start += VTD_PAGE_SIZE;
797 } 797 }
798} 798}