Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
swiotlb-xen.h
Go to the documentation of this file.
1 #ifndef __LINUX_SWIOTLB_XEN_H
2 #define __LINUX_SWIOTLB_XEN_H
3 
4 #include <linux/swiotlb.h>
5 
6 extern int xen_swiotlb_init(int verbose, bool early);
7 
8 extern void
9 *xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
11  struct dma_attrs *attrs);
12 
13 extern void
14 xen_swiotlb_free_coherent(struct device *hwdev, size_t size,
16  struct dma_attrs *attrs);
17 
18 extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
19  unsigned long offset, size_t size,
20  enum dma_data_direction dir,
21  struct dma_attrs *attrs);
22 
23 extern void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
24  size_t size, enum dma_data_direction dir,
25  struct dma_attrs *attrs);
26 extern int
27 xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
28  int nelems, enum dma_data_direction dir,
29  struct dma_attrs *attrs);
30 
31 extern void
32 xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
33  int nelems, enum dma_data_direction dir,
34  struct dma_attrs *attrs);
35 
36 extern void
37 xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
38  size_t size, enum dma_data_direction dir);
39 
40 extern void
41 xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
42  int nelems, enum dma_data_direction dir);
43 
44 extern void
46  size_t size, enum dma_data_direction dir);
47 
48 extern void
50  int nelems, enum dma_data_direction dir);
51 
52 extern int
54 
55 extern int
57 
58 #endif /* __LINUX_SWIOTLB_XEN_H */