From: Will Deacon <will.deacon@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Peter Zijlstra <peterz@infradead.org>,
Andrea Parri <andrea.parri@amarulasolutions.com>,
Daniel Lustig <dlustig@nvidia.com>,
David Howells <dhowells@redhat.com>,
Alan Stern <stern@rowland.harvard.edu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>
Subject: Re: [RFC PATCH] docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section
Date: Tue, 19 Feb 2019 11:36:09 +0000 [thread overview]
Message-ID: <20190219113609.GC4027@fuggles.cambridge.arm.com> (raw)
In-Reply-To: <CAK8P3a3n2meqogz7MeMUA48LBOEV9_AYQPxU3+V8A=Fn_63v4A@mail.gmail.com>
On Tue, Feb 19, 2019 at 12:31:50PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 19, 2019 at 11:27 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> > On Mon, 18 Feb 2019 21:37:25 +0100
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > > Ah, it seems we actually do that on 32-bit ARM, at least on one platform,
> > > see 6a02734d420f ("ARM: mvebu: map PCI I/O regions strongly ordered")
> > > and prior commits.
> >
> > Yes, some Marvell Armada 32-bit platforms have an errata that require
> > the PCI MEM and PCI I/O regions to be mapped strongly ordered.
> >
> > BTW, this requirement prevents us from using the pci_remap_iospace()
> > API from drivers/pci, because it assumes page attributes of
> > pgprot_device(PAGE_KERNEL). That's why we're still using the
> > ARM-specific pci_ioremap_io() function.
>
> Ok.
>
> > > > I would still prefer to document the weaker semantics as the portable
> > > > interface, unless there are portable drivers relying on this today (which
> > > > would imply that it's widely supported by other architectures).
> > >
> > > I don't know of any portable driver that actually relies on it, but
> > > that's mainly because there are very few portable drivers that
> > > use inb()/outb() in the first place. How many of those require
> > > the non-posted behavior I don't know
> > >
> > > Adding Thomas, Gregory and Russell to Cc, as they were involved
> > > in the discussion that led to the 32-bit change, maybe they are
> > > aware of a specific example.
> >
> > I'm just arriving in the middle of this thread, and I'm not sure to
> > understand what is the question. If the question is whether PCI I/O is
> > really used in practice, then I've never seen it be used with Marvell
> > platforms (but I'm also not aware of all PCIe devices people are
> > using). I personally have a hacked-up version of the e1000e driver
> > that intentionally does some PCI I/O accesses, that I use as a way to
> > validate that PCI I/O support is minimally working, but that's it.
>
> The main question is whether we know of a portable (not specific
> to a single architecture) driver for PCIe (or PCI, but probably not ISA)
> that uses outb/outw/outl in a way that relies on the on-posted
> behavior of those, compared to posted writeb/writew/writel that are
> only required to complete before another I/O operation on the same
> device but whose completion is not ordered with regard to the rest of
> the system.
>
> I think an example of this would be a driver using outb() to disable
> an interrupt, and then relying on the the interrupt no longer happening
> after the outb().
Isn't that racy already? i.e. the interrupt could fire just before you
disabled it, but not get delivered by the irq controller until after you'd
disabled it at the device?
Will
next prev parent reply other threads:[~2019-02-19 11:36 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 17:29 [RFC PATCH] docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section Will Deacon
2019-02-11 17:29 ` Will Deacon
2019-02-11 20:22 ` Paul E. McKenney
2019-02-11 20:22 ` Paul E. McKenney
2019-02-12 18:43 ` Will Deacon
2019-02-12 18:43 ` Will Deacon
2019-02-12 19:24 ` Paul E. McKenney
2019-02-12 19:24 ` Paul E. McKenney
2019-02-11 22:34 ` Linus Torvalds
2019-02-11 22:34 ` Linus Torvalds
2019-02-12 4:01 ` Benjamin Herrenschmidt
2019-02-12 4:01 ` Benjamin Herrenschmidt
2019-02-13 17:20 ` Will Deacon
2019-02-13 17:20 ` Will Deacon
2019-02-13 18:27 ` Linus Torvalds
2019-02-13 18:27 ` Linus Torvalds
2019-02-13 18:33 ` Peter Zijlstra
2019-02-13 18:33 ` Peter Zijlstra
2019-02-13 18:43 ` Luck, Tony
2019-02-13 18:43 ` Luck, Tony
2019-02-13 19:31 ` Paul E. McKenney
2019-02-13 19:31 ` Paul E. McKenney
2019-02-18 16:50 ` Will Deacon
2019-02-18 16:50 ` Will Deacon
2019-02-19 16:13 ` Will Deacon
2019-02-19 16:13 ` Will Deacon
2019-02-21 6:22 ` Michael Ellerman
2019-02-21 6:22 ` Michael Ellerman
2019-02-22 17:38 ` Will Deacon
2019-02-22 17:38 ` Will Deacon
2019-02-12 13:03 ` Arnd Bergmann
2019-02-12 13:03 ` Arnd Bergmann
2019-02-18 16:29 ` Will Deacon
2019-02-18 16:29 ` Will Deacon
2019-02-18 16:59 ` Arnd Bergmann
2019-02-18 16:59 ` Arnd Bergmann
2019-02-18 17:56 ` Will Deacon
2019-02-18 17:56 ` Will Deacon
2019-02-18 20:37 ` Arnd Bergmann
2019-02-18 20:37 ` Arnd Bergmann
2019-02-19 10:27 ` Thomas Petazzoni
2019-02-19 10:27 ` Thomas Petazzoni
2019-02-19 11:31 ` Arnd Bergmann
2019-02-19 11:31 ` Arnd Bergmann
2019-02-19 11:36 ` Will Deacon [this message]
2019-02-19 11:36 ` Will Deacon
2019-02-19 13:01 ` Arnd Bergmann
2019-02-19 13:01 ` Arnd Bergmann
2019-02-19 13:20 ` Will Deacon
2019-02-19 13:20 ` Will Deacon
2019-02-19 13:45 ` Arnd Bergmann
2019-02-19 13:45 ` Arnd Bergmann
2019-02-19 11:34 ` Will Deacon
2019-02-19 11:34 ` Will Deacon
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=20190219113609.GC4027@fuggles.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=andrea.parri@amarulasolutions.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=dhowells@redhat.com \
--cc=dlustig@nvidia.com \
--cc=gregory.clement@free-electrons.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=paulmck@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=thomas.petazzoni@bootlin.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=torvalds@linux-foundation.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