diff options
author | Claire Chang <tientzu@chromium.org> | 2021-06-24 23:55:20 +0800 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad@kernel.org> | 2021-07-13 20:04:43 -0400 |
commit | 903cd0f315fe426c6a64c54ed389de0becb663dc (patch) | |
tree | 5fc7baecb38bf0154a1438d00469658ac0164041 /drivers/xen | |
parent | 6f2beb268a5d35504a636c4a3b7aaa76ec32d96c (diff) | |
download | linux-903cd0f315fe426c6a64c54ed389de0becb663dc.tar.gz linux-903cd0f315fe426c6a64c54ed389de0becb663dc.tar.bz2 linux-903cd0f315fe426c6a64c54ed389de0becb663dc.zip |
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]
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 0c4fb34f11ab..785ec7e8be01 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -374,7 +374,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, if (dma_capable(dev, dev_addr, size, true) && !range_straddles_page_boundary(phys, size) && !xen_arch_need_swiotlb(dev, phys, dev_addr) && - swiotlb_force != SWIOTLB_FORCE) + !is_swiotlb_force_bounce(dev)) goto done; /* |