Thread (23 messages) 23 messages, 4 authors, 2008-05-26

Re: [patch 1/2] powerpc: rmb fix

From: Nick Piggin <hidden>
Date: 2008-05-23 04:40:58

On Fri, May 23, 2008 at 12:14:41PM +1000, Paul Mackerras wrote:
Nick Piggin writes:
quoted
More than one device driver does raw/relaxed io accessors and expects the
*mb functions to order them.
Can you point us at an example?
Uh, I might be getting confused because the semantics are completely
different eg. between powerpc and ia64.

There don't seem to actually be read*_relaxed calls that also use rmb
in the same file (although there is no reason why they might not appear).
But I must be thinking of are the raw_read accessors. They aren't ordered
on powerpc, and a few drivers appear to hope rmb() will order them.


 
I don't think the semantics of the raw accessors are particularly well
defined (it's not even defined what endianness the data comes back in)
so I'd be surprised if there was any real definition of their
behaviour w.r.t. barriers.
I think it is fair to say the intention of the _relaxed variants is
that they require memory barriers for ordering. No idea about raw read
or write but it appears that at least on powerpc and alpha they are
unordered.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help