diff options
Diffstat (limited to 'include/asm-mips/barrier.h')
-rw-r--r-- | include/asm-mips/barrier.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-mips/barrier.h b/include/asm-mips/barrier.h index ed82631b0017..9d8cfbb5e796 100644 --- a/include/asm-mips/barrier.h +++ b/include/asm-mips/barrier.h | |||
@@ -121,6 +121,11 @@ | |||
121 | #else | 121 | #else |
122 | #define __WEAK_ORDERING_MB " \n" | 122 | #define __WEAK_ORDERING_MB " \n" |
123 | #endif | 123 | #endif |
124 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) | ||
125 | #define __WEAK_LLSC_MB " sync \n" | ||
126 | #else | ||
127 | #define __WEAK_LLSC_MB " \n" | ||
128 | #endif | ||
124 | 129 | ||
125 | #define smp_mb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") | 130 | #define smp_mb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") |
126 | #define smp_rmb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") | 131 | #define smp_rmb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") |
@@ -129,4 +134,8 @@ | |||
129 | #define set_mb(var, value) \ | 134 | #define set_mb(var, value) \ |
130 | do { var = value; smp_mb(); } while (0) | 135 | do { var = value; smp_mb(); } while (0) |
131 | 136 | ||
137 | #define smp_llsc_mb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
138 | #define smp_llsc_rmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
139 | #define smp_llsc_wmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
140 | |||
132 | #endif /* __ASM_BARRIER_H */ | 141 | #endif /* __ASM_BARRIER_H */ |