From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Will Deacon <will.deacon@arm.com>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
Arnd Bergmann <arnd@arndb.de>,
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>
Subject: Re: [RFC PATCH] docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section
Date: Tue, 12 Feb 2019 15:01:13 +1100 [thread overview]
Message-ID: <d2ac1cab3b3bd7de05b6a29feda5d74a591c0081.camel@kernel.crashing.org> (raw)
In-Reply-To: <CAHk-=wiP42aqBApAUJbLAB43u5ips9ArgLxXn5L1r74bowxdow@mail.gmail.com>
On Mon, 2019-02-11 at 14:34 -0800, Linus Torvalds wrote:
> On Mon, Feb 11, 2019 at 9:30 AM Will Deacon <will.deacon@arm.com> wrote:
> > +
> > + 1. All readX() and writeX() accesses to the same peripheral are ordered
> > + with respect to each other. For example, this ensures that MMIO register
> > + writes by the CPU to a particular device will arrive in program order.
>
> Hmm. I'd like more people look at strengthening this one wrt across
> CPUs and locking.
>
> Right now we document mmiowb(), but that "documentation" is really
> just a fairy tale. Very *very* few drivers actually do mmiowb() on
> their own.
>
> IOW, we should seriously just consider making the rule be that locking
> will order mmio too. Because that's practically the rule anyway.
>
> Powerpc already does it. IO within a locked region will serialize with the lock.
Yup. It's a bit ugly but I felt back then that getting drivers to use
mmiowb() properly was going to be a losing battle.
Cheers,
Ben.
next prev parent reply other threads:[~2019-02-12 4:01 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 [this message]
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
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=d2ac1cab3b3bd7de05b6a29feda5d74a591c0081.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=andrea.parri@amarulasolutions.com \
--cc=arnd@arndb.de \
--cc=dhowells@redhat.com \
--cc=dlustig@nvidia.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
/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