diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-07-17 20:59:55 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-07-17 20:59:55 -0400 |
commit | 3dce01713723bbcc92562bd4488e8b840a4f786c (patch) | |
tree | 7e0720179ad4240b993f86f558a3efa8861f1033 | |
parent | d2c52b7983b95bb3fc2a784e479f832f142d4523 (diff) |
async_tx: remove depend_tx from async_tx_sync_epilog
All callers of async_tx_sync_epilog have called async_tx_quiesce on the
depend_tx, so async_tx_sync_epilog need only call the callback to
complete the operation.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | crypto/async_tx/async_memcpy.c | 2 | ||||
-rw-r--r-- | crypto/async_tx/async_memset.c | 2 | ||||
-rw-r--r-- | crypto/async_tx/async_tx.c | 2 | ||||
-rw-r--r-- | crypto/async_tx/async_xor.c | 7 | ||||
-rw-r--r-- | include/linux/async_tx.h | 9 |
5 files changed, 7 insertions, 15 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c index 06a7f4be9736..ddccfb01c416 100644 --- a/crypto/async_tx/async_memcpy.c +++ b/crypto/async_tx/async_memcpy.c | |||
@@ -83,7 +83,7 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
83 | kunmap_atomic(dest_buf, KM_USER0); | 83 | kunmap_atomic(dest_buf, KM_USER0); |
84 | kunmap_atomic(src_buf, KM_USER1); | 84 | kunmap_atomic(src_buf, KM_USER1); |
85 | 85 | ||
86 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 86 | async_tx_sync_epilog(cb_fn, cb_param); |
87 | } | 87 | } |
88 | 88 | ||
89 | return tx; | 89 | return tx; |
diff --git a/crypto/async_tx/async_memset.c b/crypto/async_tx/async_memset.c index d48ed22ed1c3..5b5eb99bb244 100644 --- a/crypto/async_tx/async_memset.c +++ b/crypto/async_tx/async_memset.c | |||
@@ -76,7 +76,7 @@ async_memset(struct page *dest, int val, unsigned int offset, | |||
76 | 76 | ||
77 | memset(dest_buf, val, len); | 77 | memset(dest_buf, val, len); |
78 | 78 | ||
79 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 79 | async_tx_sync_epilog(cb_fn, cb_param); |
80 | } | 80 | } |
81 | 81 | ||
82 | return tx; | 82 | return tx; |
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index 78a61e7f631a..35869a37a6f2 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c | |||
@@ -609,7 +609,7 @@ async_trigger_callback(enum async_tx_flags flags, | |||
609 | /* wait for any prerequisite operations */ | 609 | /* wait for any prerequisite operations */ |
610 | async_tx_quiesce(&depend_tx); | 610 | async_tx_quiesce(&depend_tx); |
611 | 611 | ||
612 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 612 | async_tx_sync_epilog(cb_fn, cb_param); |
613 | } | 613 | } |
614 | 614 | ||
615 | return tx; | 615 | return tx; |
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index 689ecce73ee1..65974c6d3d7a 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c | |||
@@ -121,7 +121,6 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list, | |||
121 | static void | 121 | static void |
122 | do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset, | 122 | do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset, |
123 | int src_cnt, size_t len, enum async_tx_flags flags, | 123 | int src_cnt, size_t len, enum async_tx_flags flags, |
124 | struct dma_async_tx_descriptor *depend_tx, | ||
125 | dma_async_tx_callback cb_fn, void *cb_param) | 124 | dma_async_tx_callback cb_fn, void *cb_param) |
126 | { | 125 | { |
127 | int i; | 126 | int i; |
@@ -150,7 +149,7 @@ do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
150 | src_off += xor_src_cnt; | 149 | src_off += xor_src_cnt; |
151 | } | 150 | } |
152 | 151 | ||
153 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 152 | async_tx_sync_epilog(cb_fn, cb_param); |
154 | } | 153 | } |
155 | 154 | ||
156 | /** | 155 | /** |
@@ -204,7 +203,7 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
204 | async_tx_quiesce(&depend_tx); | 203 | async_tx_quiesce(&depend_tx); |
205 | 204 | ||
206 | do_sync_xor(dest, src_list, offset, src_cnt, len, | 205 | do_sync_xor(dest, src_list, offset, src_cnt, len, |
207 | flags, depend_tx, cb_fn, cb_param); | 206 | flags, cb_fn, cb_param); |
208 | 207 | ||
209 | return NULL; | 208 | return NULL; |
210 | } | 209 | } |
@@ -287,7 +286,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list, | |||
287 | 286 | ||
288 | *result = page_is_zero(dest, offset, len) ? 0 : 1; | 287 | *result = page_is_zero(dest, offset, len) ? 0 : 1; |
289 | 288 | ||
290 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 289 | async_tx_sync_epilog(cb_fn, cb_param); |
291 | } | 290 | } |
292 | 291 | ||
293 | return tx; | 292 | return tx; |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index 9f0e7bd5bdc9..0f50d4cc4360 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h | |||
@@ -101,21 +101,14 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | |||
101 | 101 | ||
102 | /** | 102 | /** |
103 | * async_tx_sync_epilog - actions to take if an operation is run synchronously | 103 | * async_tx_sync_epilog - actions to take if an operation is run synchronously |
104 | * @flags: async_tx flags | ||
105 | * @depend_tx: transaction depends on depend_tx | ||
106 | * @cb_fn: function to call when the transaction completes | 104 | * @cb_fn: function to call when the transaction completes |
107 | * @cb_fn_param: parameter to pass to the callback routine | 105 | * @cb_fn_param: parameter to pass to the callback routine |
108 | */ | 106 | */ |
109 | static inline void | 107 | static inline void |
110 | async_tx_sync_epilog(unsigned long flags, | 108 | async_tx_sync_epilog(dma_async_tx_callback cb_fn, void *cb_fn_param) |
111 | struct dma_async_tx_descriptor *depend_tx, | ||
112 | dma_async_tx_callback cb_fn, void *cb_fn_param) | ||
113 | { | 109 | { |
114 | if (cb_fn) | 110 | if (cb_fn) |
115 | cb_fn(cb_fn_param); | 111 | cb_fn(cb_fn_param); |
116 | |||
117 | if (depend_tx && (flags & ASYNC_TX_DEP_ACK)) | ||
118 | async_tx_ack(depend_tx); | ||
119 | } | 112 | } |
120 | 113 | ||
121 | void | 114 | void |