OSDN Git Service

dma-mapping: move swiotlb arch helpers to a new header
authorChristoph Hellwig <hch@lst.de>
Wed, 10 Jan 2018 15:21:13 +0000 (16:21 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 10 Jan 2018 15:40:54 +0000 (16:40 +0100)
commitea8c64ace86647260ec4255f483e5844d62af2df
tree420f44f5f8c6839d96e814066cc6a8e80957bf01
parent10dac04c79b181b255a62f60919f29acc56277ac
dma-mapping: move swiotlb arch helpers to a new header

phys_to_dma, dma_to_phys and dma_capable are helpers published by
architecture code for use of swiotlb and xen-swiotlb only.  Drivers are
not supposed to use these directly, but use the DMA API instead.

Move these to a new asm/dma-direct.h helper, included by a
linux/dma-direct.h wrapper that provides the default linear mapping
unless the architecture wants to override it.

In the MIPS case the existing dma-coherent.h is reused for now as
untangling it will take a bit of work.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Robin Murphy <robin.murphy@arm.com>
34 files changed:
MAINTAINERS
arch/Kconfig
arch/arm/Kconfig
arch/arm/include/asm/dma-direct.h [new file with mode: 0644]
arch/arm/include/asm/dma-mapping.h
arch/arm64/include/asm/dma-mapping.h
arch/arm64/mm/dma-mapping.c
arch/ia64/include/asm/dma-mapping.h
arch/mips/Kconfig
arch/mips/include/asm/dma-direct.h [new file with mode: 0644]
arch/mips/include/asm/dma-mapping.h
arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
arch/mips/include/asm/mach-generic/dma-coherence.h
arch/mips/include/asm/mach-loongson64/dma-coherence.h
arch/powerpc/Kconfig
arch/powerpc/include/asm/dma-direct.h [new file with mode: 0644]
arch/powerpc/include/asm/dma-mapping.h
arch/tile/include/asm/dma-mapping.h
arch/unicore32/include/asm/dma-mapping.h
arch/x86/Kconfig
arch/x86/include/asm/dma-direct.h [new file with mode: 0644]
arch/x86/include/asm/dma-mapping.h
arch/x86/kernel/amd_gart_64.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-nommu.c
arch/x86/kernel/pci-swiotlb.c
arch/x86/mm/mem_encrypt.c
arch/x86/pci/sta2x11-fixup.c
arch/xtensa/include/asm/dma-mapping.h
drivers/crypto/marvell/cesa.c
drivers/mtd/nand/qcom_nandc.c
drivers/xen/swiotlb-xen.c
include/linux/dma-direct.h [new file with mode: 0644]
lib/swiotlb.c