MMIO and gcc re-ordering issue

Jonathan Corbet corbet at lwn.net
Wed May 28 01:28:30 EST 2008


On Tue, 27 May 2008 11:33:46 +1000
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> However, I'm using that as an excuse to bring back my pet subject,
> which is basically, should we instead just finally mandate the use of
> explicit rmb/wmb/mb's (which boils down to barrier() on x86) to
> drivers who want to order memory consistent accesses vs. MMIO ?

To me this seems like asking for a long series of weird bugs in
drivers.  Is the cost of a barrier in an MMIO operation so high that we
can't afford to just put them in?  Alan's suggestion of no-barrier
versions for people who know what they're doing (and who think there's a
reason to care) seems like a better way to go to me.

jon




More information about the Linuxppc-dev mailing list