Skip to content
Commit 315786eb authored by Olav Haugan's avatar Olav Haugan Committed by Joerg Roedel
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.

Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 0df1f248
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment