Skip to content

Commit 0741055

Browse files
author
Christoph Hellwig
committed
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 <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Boris Ostrovsky <[email protected]>
1 parent b2d229d commit 0741055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dma/direct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev,
9191
return swiotlb_map(dev, phys, size, dir, attrs);
9292

9393
if (unlikely(!dma_capable(dev, dma_addr, size, true))) {
94-
if (swiotlb_force != SWIOTLB_NO_FORCE)
94+
if (is_swiotlb_active(dev))
9595
return swiotlb_map(dev, phys, size, dir, attrs);
9696

9797
dev_WARN_ONCE(dev, 1,

0 commit comments

Comments
 (0)