diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-05-12 08:52:27 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 06:31:59 (GMT) |
commit | ab3f02fc237211f0583c1e7ba3bf504747be9b8d (patch) | |
tree | c859733055aed0ba98fcd4e6d3f160a86deb7d8c /arch/x86/um | |
parent | 6ce47fd961fa8fb206433789d7754c73cab3b5d0 (diff) | |
download | linux-ab3f02fc237211f0583c1e7ba3bf504747be9b8d.tar.xz |
locking/arch: Add WRITE_ONCE() to set_mb()
Since we assume set_mb() to result in a single store followed by a
full memory barrier, employ WRITE_ONCE().
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/um')
-rw-r--r-- | arch/x86/um/asm/barrier.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/um/asm/barrier.h b/arch/x86/um/asm/barrier.h index 7e8a1a6..cc0cb01 100644 --- a/arch/x86/um/asm/barrier.h +++ b/arch/x86/um/asm/barrier.h @@ -39,7 +39,7 @@ #define smp_mb() barrier() #define smp_rmb() barrier() #define smp_wmb() barrier() -#define set_mb(var, value) do { var = value; barrier(); } while (0) +#define set_mb(var, value) do { WRITE_ONCE(var, value); barrier(); } while (0) #define read_barrier_depends() do { } while (0) #define smp_read_barrier_depends() do { } while (0) |