Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dma-direct: use is_swiotlb_active in dma_direct_map_page

Use the more specific is_swiotlb_active check instead of checking the
global swiotlb_force variable.

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>

+1 -1
+1 -1
kernel/dma/direct.h
··· 91 91 return swiotlb_map(dev, phys, size, dir, attrs); 92 92 93 93 if (unlikely(!dma_capable(dev, dma_addr, size, true))) { 94 - if (swiotlb_force != SWIOTLB_NO_FORCE) 94 + if (is_swiotlb_active(dev)) 95 95 return swiotlb_map(dev, phys, size, dir, attrs); 96 96 97 97 dev_WARN_ONCE(dev, 1,