[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BCB48C05FCE8BC4D9E61E841ECBE6DB70E1020@039-SN2MPN1-013.039d.mgd.msft.net>
Date: Tue, 7 Aug 2012 02:45:45 +0000
From: Liu Qiang-B32616 <B32616@...escale.com>
To: Arnd Bergmann <arnd@...db.de>
CC: "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dan.j.williams@...il.com" <dan.j.williams@...il.com>,
"vinod.koul@...el.com" <vinod.koul@...el.com>,
Phillips Kim-R1AAHA <R1AAHA@...escale.com>,
"herbert@...dor.hengli.com.au" <herbert@...dor.hengli.com.au>,
"davem@...emloft.net" <davem@...emloft.net>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Li Yang-R58472 <r58472@...escale.com>,
Tabi Timur-B04825 <B04825@...escale.com>
Subject: RE: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of
spin_lock_irqsave
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@...db.de]
> Sent: Monday, August 06, 2012 7:57 PM
> To: Liu Qiang-B32616
> Cc: linux-crypto@...r.kernel.org; linuxppc-dev@...ts.ozlabs.org;
> dan.j.williams@...el.com; linux-kernel@...r.kernel.org;
> dan.j.williams@...il.com; vinod.koul@...el.com; Phillips Kim-R1AAHA;
> herbert@...dor.hengli.com.au; davem@...emloft.net;
> gregkh@...uxfoundation.org; Li Yang-R58472; Tabi Timur-B04825
> Subject: Re: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of
> spin_lock_irqsave
>
> On Monday 06 August 2012, qiang.liu@...escale.com wrote:
> >
> > From: Qiang Liu <qiang.liu@...escale.com>
> >
> > 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 <dan.j.williams@...el.com>
> > Cc: Dan Williams <dan.j.williams@...il.com>
> > Cc: Vinod Koul <vinod.koul@...el.com>
> > Cc: Li Yang <leoli@...escale.com>
> > Cc: Timur Tabi <timur@...escale.com>
> > Signed-off-by: Qiang Liu <qiang.liu@...escale.com>
> > Acked-by: Ira W. Snyder <iws@...o.caltech.edu>
>
> Acked-by: Arnd Bergmann <arnd@...db.de>
>
> 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.
Yes, you are right, it will disable softirq.
Thank you very much.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists