summaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 22:20:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 22:20:54 -0400
commitf72e24a1240b78f421649c4d88f5c24ab1c896a1 (patch)
tree90bed3bf33ae0abf5636dafcc3eda3cc354612b0 /include/xen
parent2c669275dc3245e2866a0eea15bda8ec8d1ab8db (diff)
parent1655cf8829d82d367d8fdb5cb58e5885d7d2a391 (diff)
Merge tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping infrastructure from Christoph Hellwig: "This is the first pull request for the new dma-mapping subsystem In this new subsystem we'll try to properly maintain all the generic code related to dma-mapping, and will further consolidate arch code into common helpers. This pull request contains: - removal of the DMA_ERROR_CODE macro, replacing it with calls to ->mapping_error so that the dma_map_ops instances are more self contained and can be shared across architectures (me) - removal of the ->set_dma_mask method, which duplicates the ->dma_capable one in terms of functionality, but requires more duplicate code. - various updates for the coherent dma pool and related arm code (Vladimir) - various smaller cleanups (me)" * tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping: (56 commits) ARM: dma-mapping: Remove traces of NOMMU code ARM: NOMMU: Set ARM_DMA_MEM_BUFFERABLE for M-class cpus ARM: NOMMU: Introduce dma operations for noMMU drivers: dma-mapping: allow dma_common_mmap() for NOMMU drivers: dma-coherent: Introduce default DMA pool drivers: dma-coherent: Account dma_pfn_offset when used with device tree dma: Take into account dma_pfn_offset dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs dma-mapping: remove dmam_free_noncoherent crypto: qat - avoid an uninitialized variable warning au1100fb: remove a bogus dma_free_nonconsistent call MAINTAINERS: add entry for dma mapping helpers powerpc: merge __dma_set_mask into dma_set_mask dma-mapping: remove the set_dma_mask method powerpc/cell: use the dma_supported method for ops switching powerpc/cell: clean up fixed mapping dma_ops initialization tile: remove dma_supported and mapping_error methods xen-swiotlb: remove xen_swiotlb_set_dma_mask arm: implement ->dma_supported instead of ->set_dma_mask mips/loongson64: implement ->dma_supported instead of ->set_dma_mask ...
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/swiotlb-xen.h62
1 files changed, 1 insertions, 61 deletions
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
index 1f6d78f044b6..ed2de363da33 100644
--- a/include/xen/swiotlb-xen.h
+++ b/include/xen/swiotlb-xen.h
@@ -1,69 +1,9 @@
1#ifndef __LINUX_SWIOTLB_XEN_H 1#ifndef __LINUX_SWIOTLB_XEN_H
2#define __LINUX_SWIOTLB_XEN_H 2#define __LINUX_SWIOTLB_XEN_H
3 3
4#include <linux/dma-direction.h>
5#include <linux/scatterlist.h>
6#include <linux/swiotlb.h> 4#include <linux/swiotlb.h>
7 5
8extern int xen_swiotlb_init(int verbose, bool early); 6extern int xen_swiotlb_init(int verbose, bool early);
7extern const struct dma_map_ops xen_swiotlb_dma_ops;
9 8
10extern void
11*xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
12 dma_addr_t *dma_handle, gfp_t flags,
13 unsigned long attrs);
14
15extern void
16xen_swiotlb_free_coherent(struct device *hwdev, size_t size,
17 void *vaddr, dma_addr_t dma_handle,
18 unsigned long attrs);
19
20extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
21 unsigned long offset, size_t size,
22 enum dma_data_direction dir,
23 unsigned long attrs);
24
25extern void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
26 size_t size, enum dma_data_direction dir,
27 unsigned long attrs);
28extern int
29xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
30 int nelems, enum dma_data_direction dir,
31 unsigned long attrs);
32
33extern void
34xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
35 int nelems, enum dma_data_direction dir,
36 unsigned long attrs);
37
38extern void
39xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
40 size_t size, enum dma_data_direction dir);
41
42extern void
43xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
44 int nelems, enum dma_data_direction dir);
45
46extern void
47xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
48 size_t size, enum dma_data_direction dir);
49
50extern void
51xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
52 int nelems, enum dma_data_direction dir);
53
54extern int
55xen_swiotlb_dma_supported(struct device *hwdev, u64 mask);
56
57extern int
58xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask);
59
60extern int
61xen_swiotlb_dma_mmap(struct device *dev, struct vm_area_struct *vma,
62 void *cpu_addr, dma_addr_t dma_addr, size_t size,
63 unsigned long attrs);
64
65extern int
66xen_swiotlb_get_sgtable(struct device *dev, struct sg_table *sgt,
67 void *cpu_addr, dma_addr_t handle, size_t size,
68 unsigned long attrs);
69#endif /* __LINUX_SWIOTLB_XEN_H */ 9#endif /* __LINUX_SWIOTLB_XEN_H */