summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/barrier_64.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-05-12 11:52:27 +0300
committerIngo Molnar <mingo@kernel.org>2015-05-19 09:31:59 +0300
commitab3f02fc237211f0583c1e7ba3bf504747be9b8d (patch)
treec859733055aed0ba98fcd4e6d3f160a86deb7d8c /arch/sparc/include/asm/barrier_64.h
parent6ce47fd961fa8fb206433789d7754c73cab3b5d0 (diff)
downloadlinux-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/sparc/include/asm/barrier_64.h')
-rw-r--r--arch/sparc/include/asm/barrier_64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/barrier_64.h b/arch/sparc/include/asm/barrier_64.h
index 76648941fea7..125fec7512f4 100644
--- a/arch/sparc/include/asm/barrier_64.h
+++ b/arch/sparc/include/asm/barrier_64.h
@@ -41,7 +41,7 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
#define dma_wmb() wmb()
#define set_mb(__var, __value) \
- do { __var = __value; membar_safe("#StoreLoad"); } while(0)
+ do { WRITE_ONCE(__var, __value); membar_safe("#StoreLoad"); } while(0)
#ifdef CONFIG_SMP
#define smp_mb() mb()