diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-05-28 11:37:10 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-06-07 11:59:27 -0400 |
commit | d7ef1533a90f432615d25729c2477bac9e72051d (patch) | |
tree | 1cb27e7e3e7341b870ca94bcd38e9da1115ef11b /include/linux/swiotlb.h | |
parent | 22d48269984fc93a71f65a54aa422aacf5fdb926 (diff) |
swiotlb: Make swiotlb bookkeeping functions visible in the header file.
We put the functions dealing with the operations on
the SWIOTLB buffer in the header and make those functions non-static.
And also make the functions exported via EXPORT_SYMBOL_GPL.
See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
full description of patchset.
[v2: swiotlb_sync_single_range_for_* no more. Remove usage.]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Albert Herranz <albert_herranz@yahoo.es>
Diffstat (limited to 'include/linux/swiotlb.h')
-rw-r--r-- | include/linux/swiotlb.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 250d766f17f7..8c0e349f4a6c 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -25,6 +25,28 @@ extern int swiotlb_force; | |||
25 | extern void swiotlb_init(int verbose); | 25 | extern void swiotlb_init(int verbose); |
26 | extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); | 26 | extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); |
27 | 27 | ||
28 | /* | ||
29 | * Enumeration for sync targets | ||
30 | */ | ||
31 | enum dma_sync_target { | ||
32 | SYNC_FOR_CPU = 0, | ||
33 | SYNC_FOR_DEVICE = 1, | ||
34 | }; | ||
35 | extern void *swiotlb_tbl_map_single(struct device *hwdev, dma_addr_t tbl_dma_addr, | ||
36 | phys_addr_t phys, size_t size, | ||
37 | enum dma_data_direction dir); | ||
38 | |||
39 | extern void swiotlb_tbl_unmap_single(struct device *hwdev, char *dma_addr, | ||
40 | size_t size, enum dma_data_direction dir); | ||
41 | |||
42 | extern void swiotlb_tbl_sync_single(struct device *hwdev, char *dma_addr, | ||
43 | size_t size, enum dma_data_direction dir, | ||
44 | enum dma_sync_target target); | ||
45 | |||
46 | /* Accessory functions. */ | ||
47 | extern void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size, | ||
48 | enum dma_data_direction dir); | ||
49 | |||
28 | extern void | 50 | extern void |
29 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 51 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
30 | dma_addr_t *dma_handle, gfp_t flags); | 52 | dma_addr_t *dma_handle, gfp_t flags); |