swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set

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>
This commit is contained in:
Christoph Hellwig 2022-02-14 10:01:26 +01:00
parent 07410559f3
commit 3469d36d47

View 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;