aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-h8300
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-h8300')
-rw-r--r--include/asm-h8300/system.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h
index 2c1e83f7b419..4b8e475908ae 100644
--- a/include/asm-h8300/system.h
+++ b/include/asm-h8300/system.h
@@ -138,6 +138,21 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
138 asm("jmp @@0"); \ 138 asm("jmp @@0"); \
139}) 139})
140 140
141#include <asm-generic/cmpxchg-local.h>
142
143/*
144 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
145 * them available.
146 */
147#define cmpxchg_local(ptr, o, n) \
148 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
149 (unsigned long)(n), sizeof(*(ptr))))
150#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
151
152#ifndef CONFIG_SMP
153#include <asm-generic/cmpxchg.h>
154#endif
155
141#define arch_align_stack(x) (x) 156#define arch_align_stack(x) (x)
142 157
143#endif /* _H8300_SYSTEM_H */ 158#endif /* _H8300_SYSTEM_H */