aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-frv/system.h')
-rw-r--r--include/asm-frv/system.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h
index b400cea81487..30a67a9da11a 100644
--- a/include/asm-frv/system.h
+++ b/include/asm-frv/system.h
@@ -179,14 +179,23 @@ do { \
179#define mb() asm volatile ("membar" : : :"memory") 179#define mb() asm volatile ("membar" : : :"memory")
180#define rmb() asm volatile ("membar" : : :"memory") 180#define rmb() asm volatile ("membar" : : :"memory")
181#define wmb() asm volatile ("membar" : : :"memory") 181#define wmb() asm volatile ("membar" : : :"memory")
182#define set_mb(var, value) do { var = value; mb(); } while (0) 182#define read_barrier_depends() barrier()
183 183
184#define smp_mb() mb() 184#ifdef CONFIG_SMP
185#define smp_rmb() rmb() 185#define smp_mb() mb()
186#define smp_wmb() wmb() 186#define smp_rmb() rmb()
187 187#define smp_wmb() wmb()
188#define read_barrier_depends() do {} while(0)
189#define smp_read_barrier_depends() read_barrier_depends() 188#define smp_read_barrier_depends() read_barrier_depends()
189#define set_mb(var, value) \
190 do { xchg(&var, (value)); } while (0)
191#else
192#define smp_mb() barrier()
193#define smp_rmb() barrier()
194#define smp_wmb() barrier()
195#define smp_read_barrier_depends() do {} while(0)
196#define set_mb(var, value) \
197 do { var = (value); barrier(); } while (0)
198#endif
190 199
191#define HARD_RESET_NOW() \ 200#define HARD_RESET_NOW() \
192do { \ 201do { \
@@ -234,7 +243,7 @@ extern void free_initmem(void);
234 break; \ 243 break; \
235 \ 244 \
236 default: \ 245 default: \
237 __xg_orig = 0; \ 246 __xg_orig = (__typeof__(__xg_orig))0; \
238 asm volatile("break"); \ 247 asm volatile("break"); \
239 break; \ 248 break; \
240 } \ 249 } \
@@ -259,7 +268,7 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
259 (__force uint32_t)__xg_test, \ 268 (__force uint32_t)__xg_test, \
260 (__force uint32_t)__xg_new); break; \ 269 (__force uint32_t)__xg_new); break; \
261 default: \ 270 default: \
262 __xg_orig = 0; \ 271 __xg_orig = (__typeof__(__xg_orig))0; \
263 asm volatile("break"); \ 272 asm volatile("break"); \
264 break; \ 273 break; \
265 } \ 274 } \