mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
bec085134e
commit
2ba05622b8
5 changed files with 27 additions and 24 deletions
|
|
@ -2635,14 +2635,7 @@ out:
|
|||
* There may not be any more sk_buffs coming right now, so push
|
||||
* any pending DMA copies to hardware
|
||||
*/
|
||||
if (!cpus_empty(net_dma.channel_mask)) {
|
||||
int chan_idx;
|
||||
for_each_cpu_mask_nr(chan_idx, net_dma.channel_mask) {
|
||||
struct dma_chan *chan = net_dma.channels[chan_idx];
|
||||
if (chan)
|
||||
dma_async_memcpy_issue_pending(chan);
|
||||
}
|
||||
}
|
||||
dma_issue_pending_all();
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue