swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing
authorClaire Chang <tientzu@chromium.org>
Thu, 24 Jun 2021 15:55:20 +0000 (23:55 +0800)
committerKonrad Rzeszutek Wilk <konrad@kernel.org>
Wed, 14 Jul 2021 00:04:43 +0000 (20:04 -0400)
commit903cd0f315fe426c6a64c54ed389de0becb663dc
tree5fc7baecb38bf0154a1438d00469658ac0164041
parent6f2beb268a5d35504a636c4a3b7aaa76ec32d96c
swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and
use it to determine whether to bounce the data or not. This will be
useful later to allow for different pools.

Signed-off-by: Claire Chang <tientzu@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Will Deacon <will@kernel.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v2: Includes Will's fix]
drivers/xen/swiotlb-xen.c
include/linux/swiotlb.h
kernel/dma/direct.c
kernel/dma/direct.h
kernel/dma/swiotlb.c