Subject: Re: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave

From: Arnd Bergmann <[email-masked]>
Date: Mon, 6 Aug 2012 11:57:17 +0000

On Monday 06 August 2012, [email-masked] wrote:
> 
> From: Qiang Liu <[email-masked]>
> 
> The use of spin_lock_irqsave() is a stronger locking mechanism than is
> required throughout the driver. The minimum locking required should be
> used instead. Interrupts will be turned off and context will be saved,
> there is needless to use irqsave.
> 
> Change all instances of spin_lock_irqsave() to spin_lock_bh().
> All manipulation of protected fields is done using tasklet context or
> weaker, which makes spin_lock_bh() the correct choice.
> 
> Cc: Dan Williams <[email-masked]>
> Cc: Dan Williams <[email-masked]>
> Cc: Vinod Koul <[email-masked]>
> Cc: Li Yang <[email-masked]>
> Cc: Timur Tabi <[email-masked]>
> Signed-off-by: Qiang Liu <[email-masked]>
> Acked-by: Ira W. Snyder <[email-masked]>

Acked-by: Arnd Bergmann <[email-masked]>

You could actually change the use of spin_lock_bh inside of the tasklet
function (dma_do_tasklet) do just spin_lock(), because softirqs are
already disabled there, but your version is also ok.