async_tx: fix multiple dependency submission
Shrink struct dma_async_tx_descriptor and introduce async_tx_channel_switch to properly inject a channel switch interrupt in the descriptor stream. This simplifies the locking model as drivers no longer need to handle dma_async_tx_descriptor.lock. Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -600,8 +600,6 @@ void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx,
|
||||
{
|
||||
tx->chan = chan;
|
||||
spin_lock_init(&tx->lock);
|
||||
INIT_LIST_HEAD(&tx->depend_node);
|
||||
INIT_LIST_HEAD(&tx->depend_list);
|
||||
}
|
||||
EXPORT_SYMBOL(dma_async_tx_descriptor_init);
|
||||
|
||||
|
@@ -63,7 +63,6 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *iop_chan, dma_cookie_t cookie)
|
||||
{
|
||||
BUG_ON(desc->async_tx.cookie < 0);
|
||||
spin_lock_bh(&desc->async_tx.lock);
|
||||
if (desc->async_tx.cookie > 0) {
|
||||
cookie = desc->async_tx.cookie;
|
||||
desc->async_tx.cookie = 0;
|
||||
@@ -101,7 +100,6 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
|
||||
|
||||
/* run dependent operations */
|
||||
async_tx_run_dependencies(&desc->async_tx);
|
||||
spin_unlock_bh(&desc->async_tx.lock);
|
||||
|
||||
return cookie;
|
||||
}
|
||||
@@ -275,8 +273,11 @@ iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan)
|
||||
|
||||
static void iop_adma_tasklet(unsigned long data)
|
||||
{
|
||||
struct iop_adma_chan *chan = (struct iop_adma_chan *) data;
|
||||
__iop_adma_slot_cleanup(chan);
|
||||
struct iop_adma_chan *iop_chan = (struct iop_adma_chan *) data;
|
||||
|
||||
spin_lock(&iop_chan->lock);
|
||||
__iop_adma_slot_cleanup(iop_chan);
|
||||
spin_unlock(&iop_chan->lock);
|
||||
}
|
||||
|
||||
static struct iop_adma_desc_slot *
|
||||
|
Reference in New Issue
Block a user