diff options
author | 2023-04-01 10:15:29 +0100 | |
---|---|---|
committer | 2023-04-07 07:38:20 +0200 | |
commit | fe4e5efa401fe15eab9259e358730145449e83a2 (patch) | |
tree | 6d67262fc05ca9030659eeb1d31e63223f995858 /include/linux/dma-map-ops.h | |
parent | dma-debug: Use %pa to format phys_addr_t (diff) | |
download | wireguard-linux-fe4e5efa401fe15eab9259e358730145449e83a2.tar.xz wireguard-linux-fe4e5efa401fe15eab9259e358730145449e83a2.zip |
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 'include/linux/dma-map-ops.h')
-rw-r--r-- | include/linux/dma-map-ops.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h index 41bf4bdb117a..31f114f486c4 100644 --- a/include/linux/dma-map-ops.h +++ b/include/linux/dma-map-ops.h @@ -269,6 +269,8 @@ static inline bool dev_is_dma_coherent(struct device *dev) return dev->dma_coherent; } #else +#define dma_default_coherent true + static inline bool dev_is_dma_coherent(struct device *dev) { return true; |