Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / x86 / include / asm / swiotlb.h
blob1c6a6cb230ffa1113d6aac27c52577cacdfb4a96
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_SWIOTLB_H
3 #define _ASM_X86_SWIOTLB_H
5 #include <linux/swiotlb.h>
7 #ifdef CONFIG_SWIOTLB
8 extern int swiotlb;
9 extern int __init pci_swiotlb_detect_override(void);
10 extern int __init pci_swiotlb_detect_4gb(void);
11 extern void __init pci_swiotlb_init(void);
12 extern void __init pci_swiotlb_late_init(void);
13 #else
14 #define swiotlb 0
15 static inline int pci_swiotlb_detect_override(void)
17 return 0;
19 static inline int pci_swiotlb_detect_4gb(void)
21 return 0;
23 static inline void pci_swiotlb_init(void)
26 static inline void pci_swiotlb_late_init(void)
29 #endif
31 extern void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
32 dma_addr_t *dma_handle, gfp_t flags,
33 unsigned long attrs);
34 extern void x86_swiotlb_free_coherent(struct device *dev, size_t size,
35 void *vaddr, dma_addr_t dma_addr,
36 unsigned long attrs);
38 #endif /* _ASM_X86_SWIOTLB_H */