On Fri, May 23, 2008 at 12:14:41PM +1000, Paul Mackerras wrote: > Nick Piggin writes: > > > 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. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev