• O
    iommu: Add iommu_map_sg() function · 315786eb
    Olav Haugan 提交于
    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: NOlav Haugan <ohaugan@codeaurora.org>
    Signed-off-by: NJoerg Roedel <jroedel@suse.de>
    315786eb
iommu.c 31.8 KB