[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/15] swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set
- To: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Mon, 4 Apr 2022 07:05:46 +0200
- Cc: x86@xxxxxxxxxx, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, tboot-devel@xxxxxxxxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx
- Delivery-date: Mon, 04 Apr 2022 05:06:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 73a41cec9e386..98bb0eb44a7bf 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -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;
--
2.30.2
|