Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd89166 authored by Olav Haugan's avatar Olav Haugan Committed by Matt Wagantall
Browse files

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.

Change-Id: I1f3dd2c3cf67b3db40ee1793580d6af5fec1247d
Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Git-commit: 315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[mitchelh: fix existing callers and implementations of
 iommu_{map,unmap}_range to match the new function names and APIs,
 maintaining stubs for the old API so that out-of-tree modules can
 continue to compile]
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 0fa959b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment