diff options
Diffstat (limited to 'include/asm-generic/barrier.h')
-rw-r--r-- | include/asm-generic/barrier.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h index e6a83d712ef6..55e3abc2d027 100644 --- a/include/asm-generic/barrier.h +++ b/include/asm-generic/barrier.h @@ -55,17 +55,43 @@ #endif #ifdef CONFIG_SMP + +#ifndef smp_mb #define smp_mb() mb() +#endif + +#ifndef smp_rmb #define smp_rmb() rmb() +#endif + +#ifndef smp_wmb #define smp_wmb() wmb() +#endif + +#ifndef smp_read_barrier_depends #define smp_read_barrier_depends() read_barrier_depends() -#else +#endif + +#else /* !CONFIG_SMP */ + +#ifndef smp_mb #define smp_mb() barrier() +#endif + +#ifndef smp_rmb #define smp_rmb() barrier() +#endif + +#ifndef smp_wmb #define smp_wmb() barrier() +#endif + +#ifndef smp_read_barrier_depends #define smp_read_barrier_depends() do { } while (0) #endif +#endif /* CONFIG_SMP */ + #ifndef smp_store_mb #define smp_store_mb(var, value) do { WRITE_ONCE(var, value); mb(); } while (0) #endif |