]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9bc985287026738aae0348232e03fb280b951e9e
treed07fec2670951b73bdacd8479deaac09bd48f48b
parent560bafeb23e4501651a67282c16c3859b44cf3df
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