diff options
-rw-r--r-- | crypto/async_tx/async_memcpy.c | 3 | ||||
-rw-r--r-- | crypto/async_tx/async_memset.c | 3 | ||||
-rw-r--r-- | crypto/async_tx/async_tx.c | 6 | ||||
-rw-r--r-- | crypto/async_tx/async_xor.c | 8 | ||||
-rw-r--r-- | include/linux/async_tx.h | 11 |
5 files changed, 22 insertions, 9 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c index 25dcf33bbc2..0f6282207b3 100644 --- a/crypto/async_tx/async_memcpy.c +++ b/crypto/async_tx/async_memcpy.c | |||
@@ -46,7 +46,8 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
46 | struct dma_async_tx_descriptor *depend_tx, | 46 | struct dma_async_tx_descriptor *depend_tx, |
47 | dma_async_tx_callback cb_fn, void *cb_param) | 47 | dma_async_tx_callback cb_fn, void *cb_param) |
48 | { | 48 | { |
49 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMCPY); | 49 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMCPY, |
50 | &dest, 1, &src, 1, len); | ||
50 | struct dma_device *device = chan ? chan->device : NULL; | 51 | struct dma_device *device = chan ? chan->device : NULL; |
51 | struct dma_async_tx_descriptor *tx = NULL; | 52 | struct dma_async_tx_descriptor *tx = NULL; |
52 | 53 | ||
diff --git a/crypto/async_tx/async_memset.c b/crypto/async_tx/async_memset.c index 8e98ab0cd37..09c0e83664b 100644 --- a/crypto/async_tx/async_memset.c +++ b/crypto/async_tx/async_memset.c | |||
@@ -46,7 +46,8 @@ async_memset(struct page *dest, int val, unsigned int offset, | |||
46 | struct dma_async_tx_descriptor *depend_tx, | 46 | struct dma_async_tx_descriptor *depend_tx, |
47 | dma_async_tx_callback cb_fn, void *cb_param) | 47 | dma_async_tx_callback cb_fn, void *cb_param) |
48 | { | 48 | { |
49 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMSET); | 49 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMSET, |
50 | &dest, 1, NULL, 0, len); | ||
50 | struct dma_device *device = chan ? chan->device : NULL; | 51 | struct dma_device *device = chan ? chan->device : NULL; |
51 | struct dma_async_tx_descriptor *tx = NULL; | 52 | struct dma_async_tx_descriptor *tx = NULL; |
52 | 53 | ||
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index f39777f30f6..562882189de 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c | |||
@@ -361,13 +361,13 @@ static void __exit async_tx_exit(void) | |||
361 | } | 361 | } |
362 | 362 | ||
363 | /** | 363 | /** |
364 | * async_tx_find_channel - find a channel to carry out the operation or let | 364 | * __async_tx_find_channel - find a channel to carry out the operation or let |
365 | * the transaction execute synchronously | 365 | * the transaction execute synchronously |
366 | * @depend_tx: transaction dependency | 366 | * @depend_tx: transaction dependency |
367 | * @tx_type: transaction type | 367 | * @tx_type: transaction type |
368 | */ | 368 | */ |
369 | struct dma_chan * | 369 | struct dma_chan * |
370 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | 370 | __async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, |
371 | enum dma_transaction_type tx_type) | 371 | enum dma_transaction_type tx_type) |
372 | { | 372 | { |
373 | /* see if we can keep the chain on one channel */ | 373 | /* see if we can keep the chain on one channel */ |
@@ -383,7 +383,7 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | |||
383 | } else | 383 | } else |
384 | return NULL; | 384 | return NULL; |
385 | } | 385 | } |
386 | EXPORT_SYMBOL_GPL(async_tx_find_channel); | 386 | EXPORT_SYMBOL_GPL(__async_tx_find_channel); |
387 | #else | 387 | #else |
388 | static int __init async_tx_init(void) | 388 | static int __init async_tx_init(void) |
389 | { | 389 | { |
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index 68d2fe4465d..2259a4ff15c 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c | |||
@@ -129,7 +129,9 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
129 | struct dma_async_tx_descriptor *depend_tx, | 129 | struct dma_async_tx_descriptor *depend_tx, |
130 | dma_async_tx_callback cb_fn, void *cb_param) | 130 | dma_async_tx_callback cb_fn, void *cb_param) |
131 | { | 131 | { |
132 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_XOR); | 132 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_XOR, |
133 | &dest, 1, src_list, | ||
134 | src_cnt, len); | ||
133 | struct dma_device *device = chan ? chan->device : NULL; | 135 | struct dma_device *device = chan ? chan->device : NULL; |
134 | struct dma_async_tx_descriptor *tx = NULL; | 136 | struct dma_async_tx_descriptor *tx = NULL; |
135 | dma_async_tx_callback _cb_fn; | 137 | dma_async_tx_callback _cb_fn; |
@@ -261,7 +263,9 @@ async_xor_zero_sum(struct page *dest, struct page **src_list, | |||
261 | struct dma_async_tx_descriptor *depend_tx, | 263 | struct dma_async_tx_descriptor *depend_tx, |
262 | dma_async_tx_callback cb_fn, void *cb_param) | 264 | dma_async_tx_callback cb_fn, void *cb_param) |
263 | { | 265 | { |
264 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_ZERO_SUM); | 266 | struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_ZERO_SUM, |
267 | &dest, 1, src_list, | ||
268 | src_cnt, len); | ||
265 | struct dma_device *device = chan ? chan->device : NULL; | 269 | struct dma_device *device = chan ? chan->device : NULL; |
266 | struct dma_async_tx_descriptor *tx = NULL; | 270 | struct dma_async_tx_descriptor *tx = NULL; |
267 | 271 | ||
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index 3d59d371dd3..eb640f0acfa 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h | |||
@@ -62,9 +62,15 @@ enum async_tx_flags { | |||
62 | void async_tx_issue_pending_all(void); | 62 | void async_tx_issue_pending_all(void); |
63 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 63 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
64 | void async_tx_run_dependencies(struct dma_async_tx_descriptor *tx); | 64 | void async_tx_run_dependencies(struct dma_async_tx_descriptor *tx); |
65 | #ifdef CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL | ||
66 | #include <asm/async_tx.h> | ||
67 | #else | ||
68 | #define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \ | ||
69 | __async_tx_find_channel(dep, type) | ||
65 | struct dma_chan * | 70 | struct dma_chan * |
66 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | 71 | __async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, |
67 | enum dma_transaction_type tx_type); | 72 | enum dma_transaction_type tx_type); |
73 | #endif /* CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL */ | ||
68 | #else | 74 | #else |
69 | static inline void async_tx_issue_pending_all(void) | 75 | static inline void async_tx_issue_pending_all(void) |
70 | { | 76 | { |
@@ -86,7 +92,8 @@ async_tx_run_dependencies(struct dma_async_tx_descriptor *tx, | |||
86 | 92 | ||
87 | static inline struct dma_chan * | 93 | static inline struct dma_chan * |
88 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | 94 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, |
89 | enum dma_transaction_type tx_type) | 95 | enum dma_transaction_type tx_type, struct page **dst, int dst_count, |
96 | struct page **src, int src_count, size_t len) | ||
90 | { | 97 | { |
91 | return NULL; | 98 | return NULL; |
92 | } | 99 | } |