projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ab36de
)
intel-iommu: Use domain_pfn_mapping() in intel_iommu_map_range()
author
David Woodhouse
<David.Woodhouse@intel.com>
Sun, 28 Jun 2009 13:22:28 +0000
(14:22 +0100)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Mon, 29 Jun 2009 12:35:00 +0000
(13:35 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c
patch
|
blob
|
history
diff --git
a/drivers/pci/intel-iommu.c
b/drivers/pci/intel-iommu.c
index dccd0a7b7a5fcef26a39e9ff0c28af5725abaf68..a490b39ca3d57b0ad10c6471c293dabc391b770a 100644
(file)
--- 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;
}