dma-direct: add dependencies to CONFIG_DMA_GLOBAL_POOL
authorChristoph Hellwig <hch@lst.de>
Thu, 5 Oct 2023 07:06:55 +0000 (09:06 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Oct 2023 14:38:02 +0000 (16:38 +0200)
CONFIG_DMA_GLOBAL_POOL can't be combined with other DMA coherent
allocators.  Add dependencies to Kconfig to document this, and make
kconfig complain about unmet dependencies if someone tries.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Greg Ungerer <gerg@linux-m68k.org>
Tested-by: Greg Ungerer <gerg@linux-m68k.org>
kernel/dma/Kconfig

index f488997b0717126b40b59e91a7d0cd1d8b4f94bf..4524db877eba3635dcb7a043e969e6ac2d1888a4 100644 (file)
@@ -135,6 +135,8 @@ config DMA_COHERENT_POOL
 
 config DMA_GLOBAL_POOL
        select DMA_DECLARE_COHERENT
+       depends on !ARCH_HAS_DMA_SET_UNCACHED
+       depends on !DMA_DIRECT_REMAP
        bool
 
 config DMA_DIRECT_REMAP