diff options
Diffstat (limited to 'include/xen/swiotlb-xen.h')
-rw-r--r-- | include/xen/swiotlb-xen.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h new file mode 100644 index 000000000000..2ea2fdc79c16 --- /dev/null +++ b/include/xen/swiotlb-xen.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef __LINUX_SWIOTLB_XEN_H | ||
2 | #define __LINUX_SWIOTLB_XEN_H | ||
3 | |||
4 | #include <linux/swiotlb.h> | ||
5 | |||
6 | extern void xen_swiotlb_init(int verbose); | ||
7 | |||
8 | extern void | ||
9 | *xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, | ||
10 | dma_addr_t *dma_handle, gfp_t flags); | ||
11 | |||
12 | extern void | ||
13 | xen_swiotlb_free_coherent(struct device *hwdev, size_t size, | ||
14 | void *vaddr, dma_addr_t dma_handle); | ||
15 | |||
16 | extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, | ||
17 | unsigned long offset, size_t size, | ||
18 | enum dma_data_direction dir, | ||
19 | struct dma_attrs *attrs); | ||
20 | |||
21 | extern void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, | ||
22 | size_t size, enum dma_data_direction dir, | ||
23 | struct dma_attrs *attrs); | ||
24 | /* | ||
25 | extern int | ||
26 | xen_swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, | ||
27 | enum dma_data_direction dir); | ||
28 | |||
29 | extern void | ||
30 | xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, | ||
31 | enum dma_data_direction dir); | ||
32 | */ | ||
33 | extern int | ||
34 | xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | ||
35 | int nelems, enum dma_data_direction dir, | ||
36 | struct dma_attrs *attrs); | ||
37 | |||
38 | extern void | ||
39 | xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | ||
40 | int nelems, enum dma_data_direction dir, | ||
41 | struct dma_attrs *attrs); | ||
42 | |||
43 | extern void | ||
44 | xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, | ||
45 | size_t size, enum dma_data_direction dir); | ||
46 | |||
47 | extern void | ||
48 | xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, | ||
49 | int nelems, enum dma_data_direction dir); | ||
50 | |||
51 | extern void | ||
52 | xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, | ||
53 | size_t size, enum dma_data_direction dir); | ||
54 | |||
55 | extern void | ||
56 | xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | ||
57 | int nelems, enum dma_data_direction dir); | ||
58 | |||
59 | extern int | ||
60 | xen_swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); | ||
61 | |||
62 | extern int | ||
63 | xen_swiotlb_dma_supported(struct device *hwdev, u64 mask); | ||
64 | |||
65 | #endif /* __LINUX_SWIOTLB_XEN_H */ | ||