diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-28 15:22:28 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-29 14:35:00 +0200 |
commit | ad05122162b67f64d5a1c6d35e001f7a88619b88 (patch) | |
tree | 9c406fd2e65fc6f0f0eb931cc951a07177035f4e /drivers/pci | |
parent | intel-iommu: Use domain_pfn_mapping() in __intel_map_single() (diff) | |
download | linux-ad05122162b67f64d5a1c6d35e001f7a88619b88.tar.xz linux-ad05122162b67f64d5a1c6d35e001f7a88619b88.zip |
intel-iommu: Use domain_pfn_mapping() in intel_iommu_map_range()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/intel-iommu.c | 7 |
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, } dmar_domain->max_addr = max_addr; } - - ret = domain_page_mapping(dmar_domain, iova, hpa, size, prot); + /* Round up size to next multiple of PAGE_SIZE, if it and + the low bits of hpa would take us onto the next page */ + size = aligned_size(hpa, size) >> VTD_PAGE_SHIFT; + ret = domain_pfn_mapping(dmar_domain, iova >> VTD_PAGE_SHIFT, + hpa >> VTD_PAGE_SHIFT, size, prot); return ret; } |