Go to the documentation of this file.
4 #ifndef _ASM_POWERPC_BARRIER_H
5 #define _ASM_POWERPC_BARRIER_H
33 #define mb() __asm__ __volatile__ ("sync" : : : "memory")
34 #define rmb() __asm__ __volatile__ ("sync" : : : "memory")
35 #define wmb() __asm__ __volatile__ ("sync" : : : "memory")
36 #define read_barrier_depends() do { } while(0)
38 #define set_mb(var, value) do { var = value; mb(); } while (0)
42 #ifdef __SUBARCH_HAS_LWSYNC
43 # define SMPWMB LWSYNC
49 #define smp_rmb() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
50 #define smp_wmb() __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")
51 #define smp_read_barrier_depends() read_barrier_depends()
53 #define smp_mb() barrier()
54 #define smp_rmb() barrier()
55 #define smp_wmb() barrier()
56 #define smp_read_barrier_depends() do { } while(0)
65 #define data_barrier(x) \
66 asm volatile("twi 0,%0,0; isync" : : "r" (x) : "memory");