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:Olav Haugan <ohaugan@codeaurora.org> Signed-off-by:
Joerg 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:
Mitchel Humpherys <mitchelh@codeaurora.org>
Loading
Please register or sign in to comment