lkml.org 
[lkml]   [2010]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock
On 07/14/2010 01:45 PM, Zachary Amsden wrote:
> That's the kind of bug I think Linus is talking about. We've been
> expecting volatile to work that way for over a decade, by my
> recollection, and if it doesn't, there is going to be a lot of broken code.
>
> Shouldn't we at least get a compiler switch to force the volatile
> behavior? I'd suggest it default to conservative.

At this point, it looks like there is no reason to be alarmed. The
documentation actually contains a statement about volatiles not being
mutually reordered across sequence points, and since asm is a statement
(rather than an expression) it is always surrounded by sequence points.
I have filed a gcc ticket to ask for clarification.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2010-07-16 06:53    [W:0.332 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site