summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/tegra-smmu.c
diff options
context:
space:
mode:
authorOlav Haugan <ohaugan@codeaurora.org>2014-10-25 09:55:16 -0700
committerJoerg Roedel <jroedel@suse.de>2014-11-04 14:53:36 +0100
commit315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd (patch)
treed07fec2670951b73bdacd8479deaac09bd48f48b /drivers/iommu/tegra-smmu.c
parent0df1f2487d2f0d04703f142813d53615d62a1da4 (diff)
downloadlinux-stable-315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd.tar.gz
linux-stable-315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd.tar.bz2
linux-stable-315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd.zip
iommu: Add iommu_map_sg() function
Mapping and unmapping are more often than not in the critical path. map_sg allows IOMMU driver implementations to optimize the process of mapping buffers into the IOMMU page tables. Instead of mapping a buffer one page at a time and requiring potentially expensive TLB operations for each page, this function allows the driver to map all pages in one go and defer TLB maintenance until after all pages have been mapped. Additionally, the mapping operation would be faster in general since clients does not have to keep calling map API over and over again for each physically contiguous chunk of memory that needs to be mapped to a virtually contiguous region. Signed-off-by: Olav Haugan <ohaugan@codeaurora.org> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/tegra-smmu.c')
-rw-r--r--drivers/iommu/tegra-smmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 3afdf43f732a..73e845a66925 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -955,6 +955,7 @@ static const struct iommu_ops smmu_iommu_ops = {
.detach_dev = smmu_iommu_detach_dev,
.map = smmu_iommu_map,
.unmap = smmu_iommu_unmap,
+ .map_sg = default_iommu_map_sg,
.iova_to_phys = smmu_iommu_iova_to_phys,
.pgsize_bitmap = SMMU_IOMMU_PGSIZES,
};