From: Thomas Gleixner <tglx@linutronix.de>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Jason Cooper <jason@lakedaemon.net>,
Linus Walleij <linus.walleij@linaro.org>,
Andrea Adami <andrea.adami@gmail.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] ARM: sa1100: use ioremapped memory to access SC registers
Date: Sat, 24 Jan 2015 20:24:26 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.11.1501242021210.5526@nanos> (raw)
In-Reply-To: <CALT56yP+PGCnbUN0BB4QTQ6phxmqL43vRoS_rtoMrgfjAtr3Rw@mail.gmail.com>
On Sat, 24 Jan 2015, Dmitry Eremin-Solenikov wrote:
> 2015-01-24 20:48 GMT+03:00 Thomas Gleixner <tglx@linutronix.de>:
> > On Thu, 15 Jan 2015, Dmitry Eremin-Solenikov wrote:
> >> static void sa1100_mask_irq(struct irq_data *d)
> >> {
> >> - ICMR &= ~BIT(d->hwirq);
> >> + u32 reg;
> >> + unsigned long flags;
> >> +
> >> + raw_spin_lock_irqsave(&lock, flags);
> >
> > What's the exact point of that lock? And how is it related to the
> > $subject of the patch?
>
> It is needed to protect ICMR register during RMW cycle, isn't it?
The original code has no protection for the RMW either.
And there is a simple reason for this. These functions are guaranteed
to be called with interrupts disabled and this is a uniprocessor
machine and it will never grow SMP support. So interrupts disabled is
serialization enough.
Thanks,
tglx
next prev parent reply other threads:[~2015-01-24 19:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 10:09 [PATCH 1/5] ARM: sa1100: add platform functions to handle PWER settings Dmitry Eremin-Solenikov
2015-01-15 10:09 ` [PATCH 2/5] ARM: sa1100: use sa11x0_sc_set_wake() in irq driver Dmitry Eremin-Solenikov
2015-01-15 10:09 ` [PATCH 3/5] ARM: sa1100: use ioremapped memory to access SC registers Dmitry Eremin-Solenikov
2015-01-24 17:48 ` Thomas Gleixner
2015-01-24 17:50 ` Dmitry Eremin-Solenikov
2015-01-24 19:24 ` Thomas Gleixner [this message]
2015-01-24 19:25 ` Dmitry Eremin-Solenikov
2015-01-15 10:09 ` [PATCH 4/5] irqchip: add sa1100 driver Dmitry Eremin-Solenikov
2015-01-15 10:09 ` [PATCH 5/5] ARM: sa1100: drop irq driver Dmitry Eremin-Solenikov
2015-01-21 10:05 ` [PATCH 1/5] ARM: sa1100: add platform functions to handle PWER settings Linus Walleij
2015-01-21 13:37 ` Dmitry Eremin-Solenikov
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=alpine.DEB.2.11.1501242021210.5526@nanos \
--to=tglx@linutronix.de \
--cc=andrea.adami@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®