iommu: Add iommu_map_sg() function
authorOlav Haugan <ohaugan@codeaurora.org>
Sat, 25 Oct 2014 16:55:16 +0000 (09:55 -0700)
committerJoerg Roedel <jroedel@suse.de>
Tue, 4 Nov 2014 13:53:36 +0000 (14:53 +0100)
commit315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd
treed07fec2670951b73bdacd8479deaac09bd48f48b
parent0df1f2487d2f0d04703f142813d53615d62a1da4
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>
drivers/iommu/amd_iommu.c
drivers/iommu/arm-smmu.c
drivers/iommu/exynos-iommu.c
drivers/iommu/intel-iommu.c
drivers/iommu/iommu.c
drivers/iommu/ipmmu-vmsa.c
drivers/iommu/msm_iommu.c
drivers/iommu/omap-iommu.c
drivers/iommu/shmobile-iommu.c
drivers/iommu/tegra-smmu.c
include/linux/iommu.h