First Support on Ginger and OMAP TI
[linux-ginger.git] / arch / alpha / include / asm / barrier.h
blobce8860a0b32db64bf0b8f8663717fd30df635b05
1 #ifndef __BARRIER_H
2 #define __BARRIER_H
4 #include <asm/compiler.h>
6 #define mb() \
7 __asm__ __volatile__("mb": : :"memory")
9 #define rmb() \
10 __asm__ __volatile__("mb": : :"memory")
12 #define wmb() \
13 __asm__ __volatile__("wmb": : :"memory")
15 #define read_barrier_depends() \
16 __asm__ __volatile__("mb": : :"memory")
18 #ifdef CONFIG_SMP
19 #define __ASM_SMP_MB "\tmb\n"
20 #define smp_mb() mb()
21 #define smp_rmb() rmb()
22 #define smp_wmb() wmb()
23 #define smp_read_barrier_depends() read_barrier_depends()
24 #else
25 #define __ASM_SMP_MB
26 #define smp_mb() barrier()
27 #define smp_rmb() barrier()
28 #define smp_wmb() barrier()
29 #define smp_read_barrier_depends() do { } while (0)
30 #endif
32 #define set_mb(var, value) \
33 do { var = value; mb(); } while (0)
35 #endif /* __BARRIER_H */