dma-direct: add a CONFIG_ARCH_HAS_DMA_ALLOC symbol
authorChristoph Hellwig <hch@lst.de>
Thu, 5 Oct 2023 07:05:36 +0000 (09:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Oct 2023 14:38:54 +0000 (16:38 +0200)
commit2c8ed1b960fb97c82ede5afc974329bfdb457f5f
treee6ec8ae5530fa02461f8c2ba7ef2b0551d375576
parentda323d4640704001f2287f729124e1cd9d5684d0
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>
arch/arm/Kconfig
arch/m68k/Kconfig
arch/parisc/Kconfig
kernel/dma/Kconfig
kernel/dma/direct.c