dma-mapping: clearly mark DMA ops as an architecture feature
DMA ops are a helper for architectures and not for drivers to override the DMA implementation. Unfortunately driver authors keep ignoring this. Make the fact more clear by renaming the symbol to ARCH_HAS_DMA_OPS and having the two drivers overriding their dma_ops depend on that. These drivers should probably be marked broken, but we can give them a bit of a grace period for that. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> # for IPU6 Acked-by: Robin Murphy <robin.murphy@arm.com>
This commit is contained in:
+2
-7
@@ -11,11 +11,6 @@ config HAS_DMA
|
||||
config DMA_OPS_HELPERS
|
||||
bool
|
||||
|
||||
config DMA_OPS
|
||||
depends on HAS_DMA
|
||||
select DMA_OPS_HELPERS
|
||||
bool
|
||||
|
||||
#
|
||||
# IOMMU drivers that can bypass the IOMMU code and optionally use the direct
|
||||
# mapping fast path should select this option and set the dma_ops_bypass
|
||||
@@ -113,8 +108,8 @@ config DMA_BOUNCE_UNALIGNED_KMALLOC
|
||||
|
||||
config DMA_NEED_SYNC
|
||||
def_bool ARCH_HAS_SYNC_DMA_FOR_DEVICE || ARCH_HAS_SYNC_DMA_FOR_CPU || \
|
||||
ARCH_HAS_SYNC_DMA_FOR_CPU_ALL || DMA_API_DEBUG || DMA_OPS || \
|
||||
SWIOTLB
|
||||
ARCH_HAS_SYNC_DMA_FOR_CPU_ALL || DMA_API_DEBUG || \
|
||||
ARCH_HAS_DMA_OPS || SWIOTLB
|
||||
|
||||
config DMA_RESTRICTED_POOL
|
||||
bool "DMA Restricted Pool"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
obj-$(CONFIG_HAS_DMA) += mapping.o direct.o
|
||||
obj-$(CONFIG_DMA_OPS_HELPERS) += ops_helpers.o
|
||||
obj-$(CONFIG_DMA_OPS) += dummy.o
|
||||
obj-$(CONFIG_ARCH_HAS_DMA_OPS) += dummy.o
|
||||
obj-$(CONFIG_DMA_CMA) += contiguous.o
|
||||
obj-$(CONFIG_DMA_DECLARE_COHERENT) += coherent.o
|
||||
obj-$(CONFIG_DMA_API_DEBUG) += debug.o
|
||||
|
||||
Reference in New Issue
Block a user