From: Jisheng Zhang <jszhang@marvell.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Sascha Hauer <kernel@pengutronix.de>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Stefan Wahren <stefan.wahren@i2se.com>,
Marek Vasut <marex@denx.de>,
Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH 2/2] mmc: mxs: Use the spinlock irq variants
Date: Fri, 28 Oct 2016 19:49:47 +0800 [thread overview]
Message-ID: <20161028194947.463870ab@xhacker> (raw)
In-Reply-To: <CAOMZO5DZUrjRgWiaW9mtmVBy0Tq+omEdiuP55TGvPiAxLvBHBg@mail.gmail.com>
Hi Fabio,
On Fri, 28 Oct 2016 09:40:29 -0200 Fabio Estevam wrote:
> Hi Jisheng,
>
> On Fri, Oct 28, 2016 at 12:23 AM, Jisheng Zhang <jszhang@marvell.com> wrote:
>
> > hmm, in interrupt handler the irq is disabled, so IMHO there's no need to
> > use irqsave/irqrestore spinlock variants.
>
> Please check Documentation/locking/spinlocks.txt:
>
> "IFF you know that the spinlocks are
> never used in interrupt handlers, you can use the non-irq versions:"
This is not the key. The key here is:
compared with the non-irq version, the irq-version spin lock does one extra
work: disable the local interrupts. But since we are in interrupt handler,
the local irq is already disabled, so there's no need for the irq-versions.
I'm not sure I understand the situation, comments are welcome.
Thanks,
Jisheng
next prev parent reply other threads:[~2016-10-28 11:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 18:57 [PATCH 1/2] mmc: mxs: Initialize the spinlock prior to using it Fabio Estevam
2016-10-27 18:57 ` [PATCH 2/2] mmc: mxs: Use the spinlock irq variants Fabio Estevam
2016-10-27 19:09 ` Marek Vasut
2016-10-28 2:23 ` Jisheng Zhang
2016-10-28 11:40 ` Fabio Estevam
2016-10-28 11:49 ` Jisheng Zhang [this message]
2016-11-05 18:56 ` Fabio Estevam
2016-11-05 19:19 ` Fabio Estevam
2016-10-27 19:06 ` [PATCH 1/2] mmc: mxs: Initialize the spinlock prior to using it Marek Vasut
2016-10-27 19:17 ` Fabio Estevam
2016-10-27 19:56 ` Marek Vasut
2016-10-28 13:18 ` Stefan Wahren
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=20161028194947.463870ab@xhacker \
--to=jszhang@marvell.com \
--cc=fabio.estevam@nxp.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-mmc@vger.kernel.org \
--cc=marex@denx.de \
--cc=stefan.wahren@i2se.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.