From: Arnd Bergmann <arnd@arndb•de>
To: qiang.liu@freescale•com
Cc: vinod.koul@intel•com, gregkh@linuxfoundation•org,
linux-kernel@vger•kernel.org, Timur Tabi <timur@freescale•com>,
dan.j.williams@gmail•com, herbert@gondor•hengli.com.au,
linux-crypto@vger•kernel.org, dan.j.williams@intel•com,
linuxppc-dev@lists•ozlabs.org, davem@davemloft•net
Subject: Re: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave
Date: Mon, 6 Aug 2012 11:57:17 +0000 [thread overview]
Message-ID: <201208061157.17667.arnd@arndb.de> (raw)
In-Reply-To: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com>
On Monday 06 August 2012, qiang.liu@freescale•com wrote:
>
> From: Qiang Liu <qiang.liu@freescale•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@intel•com>
> Cc: Dan Williams <dan.j.williams@gmail•com>
> Cc: Vinod Koul <vinod.koul@intel•com>
> Cc: Li Yang <leoli@freescale•com>
> Cc: Timur Tabi <timur@freescale•com>
> Signed-off-by: Qiang Liu <qiang.liu@freescale•com>
> Acked-by: Ira W. Snyder <iws@ovro•caltech.edu>
Acked-by: Arnd Bergmann <arnd@arndb•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.
next prev parent reply other threads:[~2012-08-06 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 10:36 [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave qiang.liu
2012-08-06 11:57 ` Arnd Bergmann [this message]
2012-08-07 2:45 ` Liu Qiang-B32616
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201208061157.17667.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=dan.j.williams@gmail$(echo .)com \
--cc=dan.j.williams@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=herbert@gondor$(echo .)hengli.com.au \
--cc=linux-crypto@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=qiang.liu@freescale$(echo .)com \
--cc=timur@freescale$(echo .)com \
--cc=vinod.koul@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox