From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 04/16] mmc: meson-gx: use _irqsave variant of spinlock
Date: Tue, 22 Aug 2017 13:41:31 +0200 [thread overview]
Message-ID: <1503402091.7032.9.camel@baylibre.com> (raw)
In-Reply-To: <CAPDyKFpoOc+1WMqLMOwhGkifP-Zp3GS7wTSkHmBUk4Pf0Dh+DQ@mail.gmail.com>
On Tue, 2017-08-22 at 13:08 +0200, Ulf Hansson wrote:
> On 21 August 2017 at 18:02, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > spinlock used in interrupt handler should use the _irqsave variant
>
> Exactly why is that needed?
That's a mistake left over from a debugging session. Thx for pointing it out.
I'll respin w/o it
>
> >
> > Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms")
> > Reviewed-by: Kevin Hilman <khilman@baylibre.com>
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> > ?drivers/mmc/host/meson-gx-mmc.c | 5 +++--
> > ?1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-
> > mmc.c
> > index 8a74a048db88..a399fbd415f4 100644
> > --- a/drivers/mmc/host/meson-gx-mmc.c
> > +++ b/drivers/mmc/host/meson-gx-mmc.c
> > @@ -727,6 +727,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
> > ????????struct mmc_command *cmd;
> > ????????struct mmc_data *data;
> > ????????u32 irq_en, status, raw_status;
> > +???????unsigned long flag;
> > ????????irqreturn_t ret = IRQ_HANDLED;
> >
> > ????????if (WARN_ON(!host))
> > @@ -739,7 +740,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
> >
> > ????????data = cmd->data;
> >
> > -???????spin_lock(&host->lock);
> > +???????spin_lock_irqsave(&host->lock, flag);
> > ????????irq_en = readl(host->regs + SD_EMMC_IRQ_EN);
> > ????????raw_status = readl(host->regs + SD_EMMC_STATUS);
> > ????????status = raw_status & irq_en;
> > @@ -806,7 +807,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
> > ????????if (ret == IRQ_HANDLED)
> > ????????????????meson_mmc_request_done(host->mmc, cmd->mrq);
> >
> > -???????spin_unlock(&host->lock);
> > +???????spin_unlock_irqrestore(&host->lock, flag);
> > ????????return ret;
> > ?}
> >
> > --
> > 2.9.5
> >
>
> Kind regards
> Uffe
next prev parent reply other threads:[~2017-08-22 11:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 16:02 [PATCH v2 00/16] mmc: meson-gx: driver fixups and upgrades Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 01/16] mmc: meson-gx: fix mux mask definition Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 02/16] mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 03/16] mmc: meson-gx: clean up some constants Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 04/16] mmc: meson-gx: use _irqsave variant of spinlock Jerome Brunet
2017-08-22 11:08 ` Ulf Hansson
2017-08-22 11:41 ` Jerome Brunet [this message]
2017-08-21 16:02 ` [PATCH v2 05/16] mmc: meson-gx: cfg init overwrite values Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 06/16] mmc: meson-gx: rework set_ios function Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 07/16] mmc: meson-gx: rework clk_set function Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 08/16] mmc: meson-gx: rework clock init function Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 09/16] mmc: meson-gx: fix dual data rate mode frequencies Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 10/16] mmc: meson-gx: work around clk-stop issue Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 11/16] mmc: meson-gx: simplify interrupt handler Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 12/16] mmc: meson-gx: implement card_busy callback Jerome Brunet
2017-08-21 16:02 ` [PATCH v2 13/16] mmc: meson-gx: use CCF to handle the clock phases Jerome Brunet
2017-08-25 0:04 ` Kevin Hilman
2017-08-21 16:02 ` [PATCH v2 14/16] mmc: meson-gx: implement voltage switch callback Jerome Brunet
2017-08-21 16:03 ` [PATCH v2 15/16] mmc: meson-gx: change default tx phase Jerome Brunet
2017-08-25 0:05 ` Kevin Hilman
2017-08-21 16:03 ` [PATCH v2 16/16] mmc: meson-gx: rework tuning function Jerome Brunet
2017-08-22 11:15 ` [PATCH v2 00/16] mmc: meson-gx: driver fixups and upgrades Ulf Hansson
2017-08-22 11:46 ` Jerome Brunet
2017-08-23 13:10 ` Ulf Hansson
2017-08-25 0:05 ` Kevin Hilman
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=1503402091.7032.9.camel@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=linus-amlogic@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).