Skip to content

Commit 66bdb14

Browse files
Christoph HellwigIngo Molnar
authored andcommitted
swiotlb: Use dma_direct_supported() for swiotlb_ops
swiotlb_alloc() calls dma_direct_alloc(), which can satisfy lower than 32-bit DMA mask requests using GFP_DMA if the architecture supports it. Various x86 drivers rely on that, so we need to support that. At the same time the whole kernel expects a 32-bit DMA mask to just work, so the other magic in swiotlb_dma_supported() isn't actually needed either. Reported-by: Dominik Brodowski <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Fixes: 6e4bf58 ("x86/dma: Use generic swiotlb_ops") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 9a3b7e5 commit 66bdb14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swiotlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,6 @@ const struct dma_map_ops swiotlb_dma_ops = {
11301130
.unmap_sg = swiotlb_unmap_sg_attrs,
11311131
.map_page = swiotlb_map_page,
11321132
.unmap_page = swiotlb_unmap_page,
1133-
.dma_supported = swiotlb_dma_supported,
1133+
.dma_supported = dma_direct_supported,
11341134
};
11351135
#endif /* CONFIG_DMA_DIRECT_OPS */

0 commit comments

Comments
 (0)