[PATCH 1/6] dmaengine/dw_dmac: Replace spin_lock_bh with irqsave variants

viresh kumar viresh.kumar at st.com
Tue Apr 19 02:25:45 EDT 2011


On 04/18/2011 04:19 PM, Viresh KUMAR wrote:
> dmaengine routines can be called from interrupt context and with interrupts
> disabled.  Whereas spin_unlock_bh can't be called from such contexts. So this
> patch converts all spin_*_bh routines to irqsave variants.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
> ---
>  drivers/dma/dw_dmac.c      |   56 +++++++++++++++++++++++++------------------
>  drivers/dma/dw_dmac_regs.h |    1 +
>  2 files changed, 33 insertions(+), 24 deletions(-)
> 
> 
> diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
> index 720f821..c89fd83 100644
> --- a/drivers/dma/dw_dmac_regs.h
> +++ b/drivers/dma/dw_dmac_regs.h
> @@ -173,6 +173,7 @@ struct dw_dma {
>  	void __iomem		*regs;
>  	struct tasklet_struct	tasklet;
>  	struct clk		*clk;
> +	unsigned long		flags; /* for spin_lock_irqsave */

Oops!!!
This must have been added in dw_dma_chan instead :(
Will resend it.

-- 
viresh



More information about the linux-arm-kernel mailing list