blob: 977f1761a25d51b25737d84436a3a80dd3f60810 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SWIOTLB_H
2#define _ASM_X86_SWIOTLB_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
FUJITA Tomonori1da4f982008-12-28 15:02:05 +09004#include <linux/swiotlb.h>
Muli Ben-Yehuda17a941d2006-01-11 22:44:42 +01005
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#ifdef CONFIG_SWIOTLB
7extern int swiotlb;
Konrad Rzeszutek Wilkefa631c2010-08-26 13:57:59 -04008extern int __init pci_swiotlb_detect_override(void);
9extern int __init pci_swiotlb_detect_4gb(void);
FUJITA Tomonori186a2502009-12-15 20:47:56 +090010extern void __init pci_swiotlb_init(void);
Konrad Rzeszutek Wilkefa631c2010-08-26 13:57:59 -040011extern void __init pci_swiotlb_late_init(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#else
13#define swiotlb 0
Konrad Rzeszutek Wilkefa631c2010-08-26 13:57:59 -040014static inline int pci_swiotlb_detect_override(void)
15{
16 return 0;
17}
18static inline int pci_swiotlb_detect_4gb(void)
FUJITA Tomonoribe54f9d2008-07-11 10:23:45 +090019{
FUJITA Tomonorib18485e2009-11-12 00:03:28 +090020 return 0;
FUJITA Tomonoribe54f9d2008-07-11 10:23:45 +090021}
FUJITA Tomonori186a2502009-12-15 20:47:56 +090022static inline void pci_swiotlb_init(void)
23{
24}
Konrad Rzeszutek Wilkefa631c2010-08-26 13:57:59 -040025static inline void pci_swiotlb_late_init(void)
26{
27}
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#endif
29
Jan Beulichcde14bb2007-02-05 18:46:40 -080030static inline void dma_mark_clean(void *addr, size_t size) {}
31
H. Peter Anvin1965aae2008-10-22 22:26:29 -070032#endif /* _ASM_X86_SWIOTLB_H */