aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:14 -0500
committerDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:14 -0500
commit2ba05622b8b143b0c95968ba59bddfbd6d2f2559 (patch)
treeb7b72d02a993ff2ba731d6608f4ab8ce87482bcb /crypto
parentbec085134e446577a983f17f57d642a88d1af53b (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.c12
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);
45 45
46static LIST_HEAD(async_tx_master_list); 46static LIST_HEAD(async_tx_master_list);
47 47
48/* async_tx_issue_pending_all - start all transactions on all channels */
49void async_tx_issue_pending_all(void)
50{
51 struct dma_chan_ref *ref;
52
53 rcu_read_lock();
54 list_for_each_entry_rcu(ref, &async_tx_master_list, node)
55 ref->chan->device->device_issue_pending(ref->chan);
56 rcu_read_unlock();
57}
58EXPORT_SYMBOL_GPL(async_tx_issue_pending_all);
59
60static void 48static void
61free_dma_chan_ref(struct rcu_head *rcu) 49free_dma_chan_ref(struct rcu_head *rcu)
62{ 50{