diff options
Diffstat (limited to 'include/asm-generic/barrier.h')
-rw-r--r-- | include/asm-generic/barrier.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h index 270b7c989ea1..55e3abc2d027 100644 --- a/include/asm-generic/barrier.h +++ b/include/asm-generic/barrier.h @@ -72,7 +72,8 @@ #define smp_read_barrier_depends() read_barrier_depends() #endif -#else +#else /* !CONFIG_SMP */ + #ifndef smp_mb #define smp_mb() barrier() #endif @@ -89,10 +90,10 @@ #define smp_read_barrier_depends() do { } while (0) #endif -#endif +#endif /* CONFIG_SMP */ -#ifndef set_mb -#define set_mb(var, value) do { (var) = (value); mb(); } while (0) +#ifndef smp_store_mb +#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); mb(); } while (0) #endif #ifndef smp_mb__before_atomic |