mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
dma-direct: add a CONFIG_ARCH_HAS_DMA_ALLOC symbol
Instead of using arch_dma_alloc if none of the generic coherent allocators are used, require the architectures to explicitly opt into providing it. This will used to deal with the case of m68knommu and coldfire where we can't do any coherent allocations whatsoever, and also makes it clear that arch_dma_alloc is a last resort. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Greg Ungerer <gerg@linux-m68k.org> Tested-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
@@ -144,6 +144,15 @@ config DMA_DIRECT_REMAP
|
||||
select DMA_COHERENT_POOL
|
||||
select DMA_NONCOHERENT_MMAP
|
||||
|
||||
#
|
||||
# Fallback to arch code for DMA allocations. This should eventually go away.
|
||||
#
|
||||
config ARCH_HAS_DMA_ALLOC
|
||||
depends on !ARCH_HAS_DMA_SET_UNCACHED
|
||||
depends on !DMA_DIRECT_REMAP
|
||||
depends on !DMA_GLOBAL_POOL
|
||||
bool
|
||||
|
||||
config DMA_CMA
|
||||
bool "DMA Contiguous Memory Allocator"
|
||||
depends on HAVE_DMA_CONTIGUOUS && CMA
|
||||
|
||||
Reference in New Issue
Block a user