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 <linux@dominikbrodowski.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: iommu@lists.linux-foundation.org
Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops")
Link: http://lkml.kernel.org/r/20180409091517.6619-2-hch@lst.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by Christoph Hellwig and committed by Ingo Molnar 66bdb147 9a3b7e5e

+1 -1
+1 -1
lib/swiotlb.c
··· 1130 .unmap_sg = swiotlb_unmap_sg_attrs, 1131 .map_page = swiotlb_map_page, 1132 .unmap_page = swiotlb_unmap_page, 1133 - .dma_supported = swiotlb_dma_supported, 1134 }; 1135 #endif /* CONFIG_DMA_DIRECT_OPS */
··· 1130 .unmap_sg = swiotlb_unmap_sg_attrs, 1131 .map_page = swiotlb_map_page, 1132 .unmap_page = swiotlb_unmap_page, 1133 + .dma_supported = dma_direct_supported, 1134 }; 1135 #endif /* CONFIG_DMA_DIRECT_OPS */