Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349159
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller |
| Date | 2016-03-03 14:40 +0100 |
| Message-ID | <r8BDX-7Jt-7@gated-at.bofh.it> (permalink) |
| References | <r8zVw-6xi-13@gated-at.bofh.it> <r8A5e-6Bm-55@gated-at.bofh.it> <r8BaX-7xs-25@gated-at.bofh.it> <r8BaX-7xs-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Mar 03, 2016 at 02:08:19PM +0100, Arnd Bergmann wrote:
> On Thursday 03 March 2016 13:01:13 Marc Zyngier wrote:
> > > +/* Routines to acknowledge, disable and enable interrupts */
> > > +static void rps_mask_irq(struct irq_data *d)
> > > +{
> > > + u32 mask = BIT(d->hwirq);
> > > +
> > > + iowrite32(mask, rps_data.base + RPS_MASK);
> >
> > I do question the use of iowrite32 here (and its ioread32 pendent
> > anywhere else), as it actually translates in a writel, which contains a
> > memory barrier. Do you have any case that requires the use of such a
> > barrier? if not, consider switching to relaxed accessors (which are the
> >
>
> I really ask everyone to do the opposite: we have seen several drivers
> blindlessly using the relaxed accessors and actually introducing bugs
> that way, so I'd rather see the readl/writel ones used by default.
I actually agree with Marc - we have far too many drivers using the
barriered IO accessors, which are really very expensive on 32-bit
ARM.
For most ARM systems, the rules are quite simple: a write which causes
DMA memory to be accessed by the device must be using the barriered
IO accessor, and a read from a DMA status register must be too.
Everything else need not be. Barriered IO accessors are only about
access ordering.
That's independent of whether you need a read-back to ensure that the
write has hit the hardware: that's a completely different problem, and
one which is harder for people to understand and get right. (Eg, for
interrupt registers.)
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/17] Add Initial support for PLX Technology OX810SE Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
[PATCH 06/17] reset: Add PLX Technology Reset Controller driver Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
Re: [PATCH 06/17] reset: Add PLX Technology Reset Controller driver Philipp Zabel <p.zabel@pengutronix.de> - 2016-03-03 15:20 +0100
Re: [PATCH 06/17] reset: Add PLX Technology Reset Controller driver Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 15:40 +0100
Re: [PATCH 06/17] reset: Add PLX Technology Reset Controller driver Philipp Zabel <p.zabel@pengutronix.de> - 2016-03-03 16:10 +0100
[PATCH 07/17] dt-bindings: Add PLX Technology Reset Controller bindings Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
Re: [PATCH 07/17] dt-bindings: Add PLX Technology Reset Controller bindings Philipp Zabel <p.zabel@pengutronix.de> - 2016-03-03 15:30 +0100
Re: [PATCH 07/17] dt-bindings: Add PLX Technology Reset Controller bindings Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 15:30 +0100
Re: [PATCH 07/17] dt-bindings: Add PLX Technology Reset Controller bindings Philipp Zabel <p.zabel@pengutronix.de> - 2016-03-03 15:40 +0100
[PATCH 05/17] dt-bindings: Add PLX Technology RPS Timer bindings Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
[PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Arnd Bergmann <arnd@arndb.de> - 2016-03-03 14:10 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-03 14:40 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Arnd Bergmann <arnd@arndb.de> - 2016-03-03 18:40 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Marc Zyngier <marc.zyngier@arm.com> - 2016-03-03 14:10 +0100
RE: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller "Ma Haijun" <mahaijuns@gmail.com> - 2016-03-03 16:40 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 18:00 +0100
Re: [PATCH 02/17] irqchip: Add PLX Technology RPS IRQ Controller Marc Zyngier <marc.zyngier@arm.com> - 2016-03-03 18:20 +0100
[PATCH 09/17] dt-bindings: Add PLX Technology OXNAS Standard Clocks bindings Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:00 +0100
Re: [PATCH 00/17] Add Initial support for PLX Technology OX810SE Arnd Bergmann <arnd@arndb.de> - 2016-03-03 13:30 +0100
Re: [PATCH 00/17] Add Initial support for PLX Technology OX810SE Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:40 +0100
csiph-web