summaryrefslogtreecommitdiff
path: root/kernel/dma
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2023-04-01 12:15:29 +0300
committerChristoph Hellwig <hch@lst.de>2023-04-07 08:38:20 +0300
commitfe4e5efa401fe15eab9259e358730145449e83a2 (patch)
tree6d67262fc05ca9030659eeb1d31e63223f995858 /kernel/dma
parentb31507dcaf3566d8ec3bdbf9922d8d5748b08a0f (diff)
downloadlinux-fe4e5efa401fe15eab9259e358730145449e83a2.tar.xz
dma-mapping: provide a fallback dma_default_coherent
dma_default_coherent was decleared unconditionally at kernel/dma/mapping.c but only decleared when any of non-coherent options is enabled in dma-map-ops.h. Guard the declaration in mapping.c with non-coherent options and provide a fallback definition. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/dma')
-rw-r--r--kernel/dma/mapping.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
index 68106e3791f6..80f9663ffe26 100644
--- a/kernel/dma/mapping.c
+++ b/kernel/dma/mapping.c
@@ -17,7 +17,11 @@
#include "debug.h"
#include "direct.h"
+#if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
+ defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \
+ defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL)
bool dma_default_coherent;
+#endif
/*
* Managed DMA API