dma-mapping: always build the direct mapping code
authorChristoph Hellwig <hch@lst.de>
Thu, 6 Dec 2018 20:50:26 +0000 (12:50 -0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Dec 2018 20:06:11 +0000 (21:06 +0100)
All architectures except for sparc64 use the dma-direct code in some
form, and even for sparc64 we had the discussion of a direct mapping
mode a while ago.  In preparation for directly calling the direct
mapping code don't bother having it optionally but always build the
code in.  This is a minor hardship for some powerpc and arm configs
that don't pull it in yet (although they should in a relase ot two),
and sparc64 which currently doesn't need it at all, but it will
reduce the ifdef mess we'd otherwise need significantly.

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>
24 files changed:
arch/alpha/Kconfig
arch/arc/Kconfig
arch/arm/Kconfig
arch/arm64/Kconfig
arch/c6x/Kconfig
arch/csky/Kconfig
arch/h8300/Kconfig
arch/hexagon/Kconfig
arch/m68k/Kconfig
arch/microblaze/Kconfig
arch/mips/Kconfig
arch/nds32/Kconfig
arch/nios2/Kconfig
arch/openrisc/Kconfig
arch/parisc/Kconfig
arch/riscv/Kconfig
arch/s390/Kconfig
arch/sh/Kconfig
arch/sparc/Kconfig
arch/unicore32/Kconfig
arch/x86/Kconfig
arch/xtensa/Kconfig
kernel/dma/Kconfig
kernel/dma/Makefile

index a7e748a46c1853092060a5eaedf7288dc238570e..5da6ff54b3e754445e13042f7ae0480e78d5b303 100644 (file)
@@ -203,7 +203,6 @@ config ALPHA_EIGER
 config ALPHA_JENSEN
        bool "Jensen"
        depends on BROKEN
-       select DMA_DIRECT_OPS
        help
          DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
          of the first-generation Alpha systems. A number of these systems
index fd48d698da2906e999e36dbb432b3385b53efe13..7deaabeb531a898bc9926b352035457bcd16cf03 100644 (file)
@@ -17,7 +17,6 @@ config ARC
        select BUILDTIME_EXTABLE_SORT
        select CLONE_BACKWARDS
        select COMMON_CLK
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
        select GENERIC_CLOCKEVENTS
        select GENERIC_FIND_FIRST_BIT
index a858ee791ef04b33e68cf200d4019ce3ecb00a2b..586fc30b23bdcf91b0e9b87b4c098f30d28d49eb 100644 (file)
@@ -30,7 +30,6 @@ config ARM
        select CLONE_BACKWARDS
        select CPU_PM if (SUSPEND || CPU_IDLE)
        select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
-       select DMA_DIRECT_OPS if !MMU
        select DMA_REMAP if MMU
        select EDAC_SUPPORT
        select EDAC_ATOMIC_SCRUB
index 06cf0ef243679016251fca889058bae1ea305fd1..2092080240b052528be816a26d4e40b77d1a8a27 100644 (file)
@@ -80,7 +80,6 @@ config ARM64
        select CPU_PM if (SUSPEND || CPU_IDLE)
        select CRC32
        select DCACHE_WORD_ACCESS
-       select DMA_DIRECT_OPS
        select DMA_DIRECT_REMAP
        select EDAC_SUPPORT
        select FRAME_POINTER
index 84420109113d50ac3cc2f3a46b9f7938ffdf6bf2..456e154674d1570dabb5609a5bb430e188975ab5 100644 (file)
@@ -9,7 +9,6 @@ config C6X
        select ARCH_HAS_SYNC_DMA_FOR_CPU
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
        select CLKDEV_LOOKUP
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64
        select GENERIC_IRQ_SHOW
        select HAVE_ARCH_TRACEHOOK
index ea74f3a9eeaf9166ed167d25de9ce673d16e3a61..37bed8aadf95b395f72b9e5c6550593e68e1c170 100644 (file)
@@ -7,7 +7,6 @@ config CSKY
        select COMMON_CLK
        select CLKSRC_MMIO
        select CLKSRC_OF
-       select DMA_DIRECT_OPS
        select DMA_DIRECT_REMAP
        select IRQ_DOMAIN
        select HANDLE_DOMAIN_IRQ
index d19c6b16cd5d08a914c862465472620bc693a56e..6472a06854703321e1d03c61c6054d41f4955c59 100644 (file)
@@ -22,7 +22,6 @@ config H8300
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_HASH
        select CPU_NO_EFFICIENT_FFS
-       select DMA_DIRECT_OPS
 
 config CPU_BIG_ENDIAN
        def_bool y
index 2b688af379e6d8dbed0bdd94ba67332cdef541ac..d71036c598de53ca5fb3ebaf230ec3eb4690aca7 100644 (file)
@@ -31,7 +31,6 @@ config HEXAGON
        select GENERIC_CLOCKEVENTS_BROADCAST
        select MODULES_USE_ELF_RELA
        select GENERIC_CPU_DEVICES
-       select DMA_DIRECT_OPS
        ---help---
          Qualcomm Hexagon is a processor architecture designed for high
          performance and low power across a wide variety of applications.
index 1bc9f1ba759a7bb3ab66c1f53ef531642048070b..8a5868e9a3a0e6f83e300157759c800789e47fa9 100644 (file)
@@ -26,7 +26,6 @@ config M68K
        select MODULES_USE_ELF_RELA
        select OLD_SIGSUSPEND3
        select OLD_SIGACTION
-       select DMA_DIRECT_OPS if HAS_DMA
        select ARCH_DISCARD_MEMBLOCK
 
 config CPU_BIG_ENDIAN
index effed2efd306c33804a769738e01f3614f0564b7..eda9e2315ef52a048d47fcfd68728f645da52d04 100644 (file)
@@ -12,7 +12,6 @@ config MICROBLAZE
        select TIMER_OF
        select CLONE_BACKWARDS3
        select COMMON_CLK
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64
        select GENERIC_CLOCKEVENTS
        select GENERIC_CPU_DEVICES
index 8272ea4c72645777b0174907f621d57040857599..2993aa9842c090758af3f6d5ddb569c182bafdd9 100644 (file)
@@ -16,7 +16,6 @@ config MIPS
        select BUILDTIME_EXTABLE_SORT
        select CLONE_BACKWARDS
        select CPU_PM if CPU_IDLE
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64 if !64BIT
        select GENERIC_CLOCKEVENTS
        select GENERIC_CMOS_UPDATE
index 7a04adacb2f0bd3a46e1bb7745f5b700b27a496e..1af6bbae72207ade8a5881dcd6772bbb520f8c99 100644 (file)
@@ -11,7 +11,6 @@ config NDS32
        select CLKSRC_MMIO
        select CLONE_BACKWARDS
        select COMMON_CLK
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64
        select GENERIC_CPU_DEVICES
        select GENERIC_CLOCKEVENTS
index 7e95506e957aae25123ca9349eb35ad8e8dac791..f6c4b0f499972140c92066134dcff5e8271626c2 100644 (file)
@@ -4,7 +4,6 @@ config NIOS2
        select ARCH_HAS_SYNC_DMA_FOR_CPU
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
        select ARCH_NO_SWAP
-       select DMA_DIRECT_OPS
        select TIMER_OF
        select GENERIC_ATOMIC64
        select GENERIC_CLOCKEVENTS
index 285f7d05c8ed2d9a1a6b230b7d14009274dbb1ae..d0feebad5a8f6b4af4da34c721d3486b002c9eff 100644 (file)
@@ -7,7 +7,6 @@
 config OPENRISC
        def_bool y
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
-       select DMA_DIRECT_OPS
        select OF
        select OF_EARLY_FLATTREE
        select IRQ_DOMAIN
index 428ee50fc3dbce5cc0626384e5d51162ebab07a3..6e1b71da0e713197e3e0322aed26b67eae7677ae 100644 (file)
@@ -185,7 +185,6 @@ config PA11
        depends on PA7000 || PA7100LC || PA7200 || PA7300LC
        select ARCH_HAS_SYNC_DMA_FOR_CPU
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
-       select DMA_DIRECT_OPS
        select DMA_NONCOHERENT_CACHE_SYNC
 
 config PREFETCH
index 55da93f4e818e22ff1918aa625a56dde5bc56019..51d89c4b1dca6d342ea881499664e9807a50f49a 100644 (file)
@@ -19,7 +19,6 @@ config RISCV
        select ARCH_WANT_FRAME_POINTERS
        select CLONE_BACKWARDS
        select COMMON_CLK
-       select DMA_DIRECT_OPS
        select GENERIC_CLOCKEVENTS
        select GENERIC_CPU_DEVICES
        select GENERIC_IRQ_SHOW
index 5624e86070544f2a12348be88a13f90dd8c236fa..21d271d04ca612a9b4bb6becadbedd94bc7a8e5c 100644 (file)
@@ -139,7 +139,6 @@ config S390
        select HAVE_COPY_THREAD_TLS
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_CONTIGUOUS
-       select DMA_DIRECT_OPS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
index f82a4da7adf3fb34d4a8d03bf9a294f3a6312108..10fd4e9c454b39fb16b5eb1ade649f2971decad6 100644 (file)
@@ -7,7 +7,6 @@ config SUPERH
        select ARCH_NO_COHERENT_DMA_MMAP if !MMU
        select HAVE_PATA_PLATFORM
        select CLKDEV_LOOKUP
-       select DMA_DIRECT_OPS
        select HAVE_IDE if HAS_IOPORT_MAP
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
index 8853b6ceae17572903e7cf8f0c8b98df3cd6a0bc..f5bb9ded1d187fc1031c0e6c53fd3dc8ed7cc41c 100644 (file)
@@ -48,7 +48,6 @@ config SPARC
 config SPARC32
        def_bool !64BIT
        select ARCH_HAS_SYNC_DMA_FOR_CPU
-       select DMA_DIRECT_OPS
        select GENERIC_ATOMIC64
        select CLZ_TAB
        select HAVE_UID16
index a4c05159dca5c29ce4393176e13a61a6ec3fcb84..2681027d7bffb2426bb887f8266b8e55afbe152b 100644 (file)
@@ -4,7 +4,6 @@ config UNICORE32
        select ARCH_HAS_DEVMEM_IS_ALLOWED
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select ARCH_MIGHT_HAVE_PC_SERIO
-       select DMA_DIRECT_OPS
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
index adc845b66f015767091961caf0aa9e02899ddf43..c14d4a35be13c6372a278f4f8365ee07ffd90995 100644 (file)
@@ -89,7 +89,6 @@ config X86
        select CLOCKSOURCE_VALIDATE_LAST_CYCLE
        select CLOCKSOURCE_WATCHDOG
        select DCACHE_WORD_ACCESS
-       select DMA_DIRECT_OPS
        select EDAC_ATOMIC_SCRUB
        select EDAC_SUPPORT
        select GENERIC_CLOCKEVENTS
index 75488b606edca0d6fbb57f18f5cf026631cb7f5b..36338e7564a3f61f6be015768367cc0c20903994 100644 (file)
@@ -9,7 +9,6 @@ config XTENSA
        select BUILDTIME_EXTABLE_SORT
        select CLONE_BACKWARDS
        select COMMON_CLK
-       select DMA_DIRECT_OPS
        select DMA_REMAP if MMU
        select GENERIC_ATOMIC64
        select GENERIC_CLOCKEVENTS
index 41c3b1df70eb0604cd9916cc6c69e48a406604d4..ca88b867e7fea00bec11fb43c9448c367a17adfe 100644 (file)
@@ -35,13 +35,8 @@ config ARCH_HAS_DMA_COHERENT_TO_PFN
 config ARCH_HAS_DMA_MMAP_PGPROT
        bool
 
-config DMA_DIRECT_OPS
-       bool
-       depends on HAS_DMA
-
 config DMA_NONCOHERENT_CACHE_SYNC
        bool
-       depends on DMA_DIRECT_OPS
 
 config DMA_VIRT_OPS
        bool
@@ -49,7 +44,6 @@ config DMA_VIRT_OPS
 
 config SWIOTLB
        bool
-       select DMA_DIRECT_OPS
        select NEED_DMA_MAP_STATE
 
 config DMA_REMAP
@@ -58,5 +52,4 @@ config DMA_REMAP
 
 config DMA_DIRECT_REMAP
        bool
-       depends on DMA_DIRECT_OPS
        select DMA_REMAP
index f4feeceb802005d1bb25c8c1e2b280555fe459a5..a626f643cd6325af1aab3824e9aad8f27cf1ee20 100644 (file)
@@ -1,9 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 
-obj-$(CONFIG_HAS_DMA)                  += mapping.o
+obj-$(CONFIG_HAS_DMA)                  += mapping.o direct.o
 obj-$(CONFIG_DMA_CMA)                  += contiguous.o
 obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += coherent.o
-obj-$(CONFIG_DMA_DIRECT_OPS)           += direct.o
 obj-$(CONFIG_DMA_VIRT_OPS)             += virt.o
 obj-$(CONFIG_DMA_API_DEBUG)            += debug.o
 obj-$(CONFIG_SWIOTLB)                  += swiotlb.o