Skip to content

Commit

Permalink
swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig committed Apr 18, 2022
1 parent 0741055 commit 3469d36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/dma/swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3469d36

Please sign in to comment.