aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/intel-iommu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index dccd0a7b7a5f..a490b39ca3d5 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -3516,8 +3516,11 @@ static int intel_iommu_map_range(struct iommu_domain *domain,
3516 } 3516 }
3517 dmar_domain->max_addr = max_addr; 3517 dmar_domain->max_addr = max_addr;
3518 } 3518 }
3519 3519 /* Round up size to next multiple of PAGE_SIZE, if it and
3520 ret = domain_page_mapping(dmar_domain, iova, hpa, size, prot); 3520 the low bits of hpa would take us onto the next page */
3521 size = aligned_size(hpa, size) >> VTD_PAGE_SHIFT;
3522 ret = domain_pfn_mapping(dmar_domain, iova >> VTD_PAGE_SHIFT,
3523 hpa >> VTD_PAGE_SHIFT, size, prot);
3521 return ret; 3524 return ret;
3522} 3525}
3523 3526