Cc: Alan Stern <stern@...>, Alan Cox <alan@...>, Pavel Machek <pavel@...>, Paul E. McKenney <paulmck@...>, Andrew Morton <akpm@...>, Zdenek Kabelac <zdenek.kabelac@...>, <davem@...>, Rafael J. Wysocki <rjw@...>, Pierre Ossman <drzeus-mmc@...>, Kernel development list <linux-kernel@...>, pm list <linux-pm@...>
You'd better not be using unaligned accesses for memory-ordering-sensitive
things (I think x86 happens get even that right for most cases, but I
don't think the architecture specification guarantees it, and I'm pretty
sure that you might find problems on cache crossing writes, for example)
But quite frankly, if you have an architecture that can't do the above as
a single write when it's a pointer, then you have a totally broken
architecture. It's not worth supporting.
(There are data structures that are harder than native words: bytes and
shorts can require load-modify-write cycles, and "u64" and friends can
obviously be multiple words, so you shouldn't depend on things for those
"complex" cases. But we *definitely* depend on atomicity for regular word
accesses).
Linus
--