dma-direct: merge swiotlb_dma_ops into the dma_direct code
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Dec 2018 10:43:54 +0000 (11:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Dec 2018 20:06:17 +0000 (21:06 +0100)
commit55897af63091ebc2c3f239c6a6666f748113ac50
tree49340a30e15ae65d71fc5f453559340672064d70
parent17ac524719f3fc88c1a90528f4789e4b4f618512
dma-direct: merge swiotlb_dma_ops into the dma_direct code

While the dma-direct code is (relatively) clean and simple we actually
have to use the swiotlb ops for the mapping on many architectures due
to devices with addressing limits.  Instead of keeping two
implementations around this commit allows the dma-direct
implementation to call the swiotlb bounce buffering functions and
thus share the guts of the mapping implementation.  This also
simplified the dma-mapping setup on a few architectures where we
don't have to differenciate which implementation to use.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Tony Luck <tony.luck@intel.com>
14 files changed:
arch/arm64/mm/dma-mapping.c
arch/ia64/hp/common/hwsw_iommu.c
arch/ia64/hp/common/sba_iommu.c
arch/ia64/kernel/dma-mapping.c
arch/mips/include/asm/dma-mapping.h
arch/powerpc/kernel/dma-swiotlb.c
arch/riscv/include/asm/dma-mapping.h [deleted file]
arch/x86/kernel/pci-swiotlb.c
arch/x86/mm/mem_encrypt.c
arch/x86/pci/sta2x11-fixup.c
include/linux/dma-direct.h
include/linux/swiotlb.h
kernel/dma/direct.c
kernel/dma/swiotlb.c