Skip to content
  • Olav Haugan's avatar
    iommu: Add iommu_map_sg() function · 315786eb
    Olav Haugan authored
    
    
    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>
    315786eb