diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:36:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:36:39 -0400 |
commit | 4a35cee066df1b1958e25e71595b3845d06b192e (patch) | |
tree | 0d6c9de77da09a6d42d1bf03983f620615cc6f24 /include | |
parent | 7e6880951da86928c7f6cecf26dcb8e8d9f826da (diff) | |
parent | d7ef1533a90f432615d25729c2477bac9e72051d (diff) |
Merge branch 'stable/swiotlb-0.8.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6
* 'stable/swiotlb-0.8.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6:
swiotlb: Make swiotlb bookkeeping functions visible in the header file.
swiotlb: search and replace "int dir" with "enum dma_data_direction dir"
swiotlb: Make internal bookkeeping functions have 'swiotlb_tbl' prefix.
swiotlb: add the swiotlb initialization function with iotlb memory
swiotlb: add swiotlb_tbl_map_single library function
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/swiotlb.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 81a4e213c6cf..8c0e349f4a6c 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -23,6 +23,29 @@ extern int swiotlb_force; | |||
23 | #define IO_TLB_SHIFT 11 | 23 | #define IO_TLB_SHIFT 11 |
24 | 24 | ||
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); | ||
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); | ||
26 | 49 | ||
27 | extern void | 50 | extern void |
28 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 51 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
@@ -42,11 +65,11 @@ extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, | |||
42 | 65 | ||
43 | extern int | 66 | extern int |
44 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 67 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
45 | int direction); | 68 | enum dma_data_direction dir); |
46 | 69 | ||
47 | extern void | 70 | extern void |
48 | swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 71 | swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
49 | int direction); | 72 | enum dma_data_direction dir); |
50 | 73 | ||
51 | extern int | 74 | extern int |
52 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, | 75 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, |