swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set
authorChristoph Hellwig <hch@lst.de>
Mon, 14 Feb 2022 09:01:26 +0000 (10:01 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 18 Apr 2022 05:21:08 +0000 (07:21 +0200)
If force bouncing is enabled we can't release the buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
kernel/dma/swiotlb.c

index 73a41ce..98bb0eb 100644 (file)
@@ -369,6 +369,9 @@ void __init swiotlb_exit(void)
        unsigned long tbl_vaddr;
        size_t tbl_size, slots_size;
 
+       if (swiotlb_force == SWIOTLB_FORCE)
+               return;
+
        if (!mem->nslabs)
                return;