Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / arch / arm64 / include / asm / dma-mapping.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2012 ARM Ltd.
4  */
5 #ifndef __ASM_DMA_MAPPING_H
6 #define __ASM_DMA_MAPPING_H
7
8 #ifdef __KERNEL__
9
10 #include <linux/types.h>
11 #include <linux/vmalloc.h>
12
13 #include <xen/xen.h>
14 #include <asm/xen/hypervisor.h>
15
16 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
17 {
18         return NULL;
19 }
20
21 /*
22  * Do not use this function in a driver, it is only provided for
23  * arch/arm/mm/xen.c, which is used by arm64 as well.
24  */
25 static inline bool is_device_dma_coherent(struct device *dev)
26 {
27         return dev->dma_coherent;
28 }
29
30 #endif  /* __KERNEL__ */
31 #endif  /* __ASM_DMA_MAPPING_H */