[PATCH 02/12] swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If force bouncing is enabled we can't release the buffers.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
---
 kernel/dma/swiotlb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index bfc56cb217059..64b390136f9ef 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -378,6 +378,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;
 
-- 
2.30.2




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux