diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-avr32/system.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/asm-avr32/system.h b/include/asm-avr32/system.h index a8236bacc8..dc2d527cef 100644 --- a/include/asm-avr32/system.h +++ b/include/asm-avr32/system.h | |||
| @@ -73,11 +73,16 @@ extern struct task_struct *__switch_to(struct task_struct *, | |||
| 73 | 73 | ||
| 74 | extern void __xchg_called_with_bad_pointer(void); | 74 | extern void __xchg_called_with_bad_pointer(void); |
| 75 | 75 | ||
| 76 | #ifdef __CHECKER__ | 76 | static inline unsigned long xchg_u32(u32 val, volatile u32 *m) |
| 77 | extern unsigned long __builtin_xchg(void *ptr, unsigned long x); | 77 | { |
| 78 | #endif | 78 | u32 ret; |
| 79 | 79 | ||
| 80 | #define xchg_u32(val, m) __builtin_xchg((void *)m, val) | 80 | asm volatile("xchg %[ret], %[m], %[val]" |
| 81 | : [ret] "=&r"(ret), "=m"(*m) | ||
| 82 | : "m"(*m), [m] "r"(m), [val] "r"(val) | ||
| 83 | : "memory"); | ||
| 84 | return ret; | ||
| 85 | } | ||
| 81 | 86 | ||
| 82 | static inline unsigned long __xchg(unsigned long x, | 87 | static inline unsigned long __xchg(unsigned long x, |
| 83 | volatile void *ptr, | 88 | volatile void *ptr, |
