Skip to content

Commit 3dce017

Browse files
committed
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>
1 parent d2c52b7 commit 3dce017

5 files changed

Lines changed: 7 additions & 15 deletions

File tree

‎crypto/async_tx/async_memcpy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
8383
kunmap_atomic(dest_buf, KM_USER0);
8484
kunmap_atomic(src_buf, KM_USER1);
8585

86-
async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
86+
async_tx_sync_epilog(cb_fn, cb_param);
8787
}
8888

8989
return tx;

‎crypto/async_tx/async_memset.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async_memset(struct page *dest, int val, unsigned int offset,
7676

7777
memset(dest_buf, val, len);
7878

79-
async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
79+
async_tx_sync_epilog(cb_fn, cb_param);
8080
}
8181

8282
return tx;

‎crypto/async_tx/async_tx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ async_trigger_callback(enum async_tx_flags flags,
609609
/* wait for any prerequisite operations */
610610
async_tx_quiesce(&depend_tx);
611611

612-
async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
612+
async_tx_sync_epilog(cb_fn, cb_param);
613613
}
614614

615615
return tx;

‎crypto/async_tx/async_xor.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
121121
static void
122122
do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset,
123123
int src_cnt, size_t len, enum async_tx_flags flags,
124-
struct dma_async_tx_descriptor *depend_tx,
125124
dma_async_tx_callback cb_fn, void *cb_param)
126125
{
127126
int i;
@@ -150,7 +149,7 @@ do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset,
150149
src_off += xor_src_cnt;
151150
}
152151

153-
async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
152+
async_tx_sync_epilog(cb_fn, cb_param);
154153
}
155154

156155
/**
@@ -204,7 +203,7 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset,
204203
async_tx_quiesce(&depend_tx);
205204

206205
do_sync_xor(dest, src_list, offset, src_cnt, len,
207-
flags, depend_tx, cb_fn, cb_param);
206+
flags, cb_fn, cb_param);
208207

209208
return NULL;
210209
}
@@ -287,7 +286,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
287286

288287
*result = page_is_zero(dest, offset, len) ? 0 : 1;
289288

290-
async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
289+
async_tx_sync_epilog(cb_fn, cb_param);
291290
}
292291

293292
return tx;

‎include/linux/async_tx.h‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,14 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx,
101101

102102
/**
103103
* 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
106104
* @cb_fn: function to call when the transaction completes
107105
* @cb_fn_param: parameter to pass to the callback routine
108106
*/
109107
static inline void
110-
async_tx_sync_epilog(unsigned long flags,
111-
struct dma_async_tx_descriptor *depend_tx,
112-
dma_async_tx_callback cb_fn, void *cb_fn_param)
108+
async_tx_sync_epilog(dma_async_tx_callback cb_fn, void *cb_fn_param)
113109
{
114110
if (cb_fn)
115111
cb_fn(cb_fn_param);
116-
117-
if (depend_tx && (flags & ASYNC_TX_DEP_ACK))
118-
async_tx_ack(depend_tx);
119112
}
120113

121114
void

0 commit comments

Comments
 (0)