Avoid waiting for pending dma invoke in spinlock
Currently, spinlock is acquired and wait state is entered for dma_invoke to complete. This scenario leads to watchdog bark for threads waiting to acquire spinlock. This change is to avoid waiting for dma_invoke completion after acquiring spinlock. Change-Id: I9443fd8bfda77194103a871e4ad0295f79cf3034 Signed-off-by: Ansa Ahmed <quic_ansa@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
9151ca9fdd
commit
7da4c92f79
@@ -5782,8 +5782,17 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
|
||||
|
||||
spin_lock_irqsave(&fl->apps->hlock, irq_flags);
|
||||
is_locked = true;
|
||||
if (fl->is_dma_invoke_pend)
|
||||
wait_for_completion(&fl->dma_invoke);
|
||||
if (!fl->is_dma_invoke_pend)
|
||||
goto skip_dmainvoke_wait;
|
||||
is_locked = false;
|
||||
spin_unlock_irqrestore(&fl->apps->hlock, irq_flags);
|
||||
wait_for_completion(&fl->dma_invoke);
|
||||
|
||||
skip_dmainvoke_wait:
|
||||
if (!is_locked) {
|
||||
spin_lock_irqsave(&fl->apps->hlock, irq_flags);
|
||||
is_locked = true;
|
||||
}
|
||||
if (!fl->is_ramdump_pend)
|
||||
goto skip_dump_wait;
|
||||
is_locked = false;
|
||||
|
Reference in New Issue
Block a user