diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-11-18 17:05:51 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-11-18 17:05:51 -0700 |
commit | 9f4eeb9ae77f89fb77befcb4551b08602c48366d (patch) | |
tree | 0ba2b6ebe2eb82201db1dedd6339ca06f2a25e07 /crypto | |
parent | 4484f4c1a29143c77f8458c7bc1c9133747a6dd0 (diff) |
dmaengine: provide a common 'issue_pending_all' implementation
async_tx and net_dma each have open-coded versions of issue_pending_all,
so provide a common routine in dmaengine.
The implementation needs to walk the global device list, so implement
rcu to allow dma_issue_pending_all to run lockless. Clients protect
themselves from channel removal events by holding a dmaengine reference.
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/async_tx/async_tx.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index b88bb1f608fc..2cdf7a0867b7 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c @@ -45,18 +45,6 @@ static DEFINE_SPINLOCK(async_tx_lock); static LIST_HEAD(async_tx_master_list); -/* async_tx_issue_pending_all - start all transactions on all channels */ -void async_tx_issue_pending_all(void) -{ - struct dma_chan_ref *ref; - - rcu_read_lock(); - list_for_each_entry_rcu(ref, &async_tx_master_list, node) - ref->chan->device->device_issue_pending(ref->chan); - rcu_read_unlock(); -} -EXPORT_SYMBOL_GPL(async_tx_issue_pending_all); - static void free_dma_chan_ref(struct rcu_head *rcu) { |