diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-12-27 08:04:42 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-01-12 13:46:57 -0500 |
commit | 90a3ccb0be538a914e6a5c51ae919762261563ad (patch) | |
tree | cdf5acfa14f0ea661640646572181d1250c7572d /arch | |
parent | 82b44496abd91781ed4120c3b0c1a3d111c3e28e (diff) |
sh: define __smp_xxx, fix smp_store_mb for !SMP
sh variant of smp_store_mb() calls xchg() on !SMP which is stronger than
implied by both the name and the documentation.
define __smp_store_mb instead: code in asm-generic/barrier.h
will then define smp_store_mb correctly depending on
CONFIG_SMP.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/include/asm/barrier.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sh/include/asm/barrier.h b/arch/sh/include/asm/barrier.h index bf91037db4e0..f887c6465a82 100644 --- a/arch/sh/include/asm/barrier.h +++ b/arch/sh/include/asm/barrier.h | |||
@@ -32,7 +32,8 @@ | |||
32 | #define ctrl_barrier() __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop") | 32 | #define ctrl_barrier() __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop") |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define smp_store_mb(var, value) do { (void)xchg(&var, value); } while (0) | 35 | #define __smp_store_mb(var, value) do { (void)xchg(&var, value); } while (0) |
36 | #define smp_store_mb(var, value) __smp_store_mb(var, value) | ||
36 | 37 | ||
37 | #include <asm-generic/barrier.h> | 38 | #include <asm-generic/barrier.h> |
38 | 39 | ||