[RFC PATCH] x86: Use volatile semantics for atomic_set()

2014-09-22 Thread Pranith Kumar
All the atomic operations have volatile semantics to prevent compiler reordering. Enforce the same semantics for atomic_set() too. Signed-off-by: Pranith Kumar --- arch/x86/include/asm/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/atomic.h b/ar

Re: [RFC PATCH] x86: Use volatile semantics for atomic_set()

2014-09-22 Thread Peter Zijlstra
On Mon, Sep 22, 2014 at 03:39:21PM -0400, Pranith Kumar wrote: > All the atomic operations have volatile semantics to prevent compiler > reordering. Enforce the same semantics for atomic_set() too. To what point? atomic_set() is typically not what you expect it to anyhow. -- To unsubscribe from th

Re: [RFC PATCH] x86: Use volatile semantics for atomic_set()

2014-09-22 Thread Pranith Kumar
On Mon, Sep 22, 2014 at 4:08 PM, Peter Zijlstra wrote: > On Mon, Sep 22, 2014 at 03:39:21PM -0400, Pranith Kumar wrote: >> All the atomic operations have volatile semantics to prevent compiler >> reordering. Enforce the same semantics for atomic_set() too. > > To what point? atomic_set() is typica

Re: [RFC PATCH] x86: Use volatile semantics for atomic_set()

2014-09-23 Thread Peter Zijlstra
On Mon, Sep 22, 2014 at 05:42:16PM -0400, Pranith Kumar wrote: > On Mon, Sep 22, 2014 at 4:08 PM, Peter Zijlstra wrote: > > On Mon, Sep 22, 2014 at 03:39:21PM -0400, Pranith Kumar wrote: > >> All the atomic operations have volatile semantics to prevent compiler > >> reordering. Enforce the same se