diff options
author | Christoph Hellwig <hch@lst.de> | 2021-02-10 10:56:39 +0100 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-02-13 09:51:45 +0100 |
commit | 6d4e9a8efe3d59f31367d79e970c2f328da139a4 (patch) | |
tree | 7e236f45053e397f6810c2494dda6c251b19a5bc /kernel/dma | |
parent | 14ac09a65e19528ca05df56f8e36a4a8d4949795 (diff) | |
download | linux-6d4e9a8efe3d59f31367d79e970c2f328da139a4.tar.gz linux-6d4e9a8efe3d59f31367d79e970c2f328da139a4.tar.bz2 linux-6d4e9a8efe3d59f31367d79e970c2f328da139a4.zip |
driver core: lift dma_default_coherent into common code
Lift the dma_default_coherent variable from the mips architecture code
to the driver core. This allows an architecture to sdefault all device
to be DMA coherent at run time, even if the kernel is build with support
for DMA noncoherent device. By allowing device_initialize to set the
->dma_coherent field to this default the amount of arch hooks required
for this behavior can be greatly reduced.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'kernel/dma')
-rw-r--r-- | kernel/dma/Kconfig | 3 | ||||
-rw-r--r-- | kernel/dma/mapping.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 479fc145acfc..77b405508743 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -33,9 +33,6 @@ config NEED_DMA_MAP_STATE config ARCH_DMA_ADDR_T_64BIT def_bool 64BIT || PHYS_ADDR_T_64BIT -config ARCH_HAS_DMA_COHERENCE_H - bool - config ARCH_HAS_DMA_SET_MASK bool diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index f87a89d08654..84de6b1c5fab 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c @@ -16,6 +16,8 @@ #include "debug.h" #include "direct.h" +bool dma_default_coherent; + /* * Managed DMA API */ |