Messages in this thread | | | Date | Wed, 14 Jul 2010 11:23:30 -0700 | Subject | Re: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock | From | Linus Torvalds <> |
| |
On Wed, Jul 14, 2010 at 11:15 AM, Jeremy Fitzhardinge <jeremy@goop.org> wrote: > > I think we should consider that deprecated and rely on dependencies and > clobbers.
That makes no sense. According to that logic, "asm volatile" has no semantic meaning at ALL. That's just crazy talk.
The sane compiler semantics for "asm volatile" is that it acts as a volatile memory access. That's what the naming implies, and it has valid semantics that also happen to match the historical semantics. It means that it cannot be removed or duplicated, and it cannot be re-ordered wrt other volatile accesses (whether "asm volatile" or a traditional C volatile memory access).
I agree that we could just add memory clobbers to them all, but my objection to that is that it just makes the whole keyword totally pointless.
Linus
| |