• Petr Tesarik's avatar
    swiotlb: search the software IO TLB only if the device makes use of it · 1395706a
    Petr Tesarik authored
    Skip searching the software IO TLB if a device has never used it, making
    sure these devices are not affected by the introduction of multiple IO TLB
    memory pools.
    
    Additional memory barrier is required to ensure that the new value of the
    flag is visible to other CPUs after mapping a new bounce buffer. For
    efficiency, the flag check should be inlined, and then the memory barrier
    must be moved to is_swiotlb_buffer(). However, it can replace the existing
    barrier in swiotlb_find_pool(), because all callers use is_swiotlb_buffer()
    first to verify that the buffer address belongs to the software IO TLB.
    Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    1395706a
swiotlb.c 45.6 KB