diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 19:13:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 19:13:44 -0700 |
commit | 55982fd184a065b1c69279d29cbc01dbf424d2f4 (patch) | |
tree | 9b309cba341736a0766249ba51972a8ca040e502 /include/asm-avr32/system.h | |
parent | 1ef3e36251e4edc77a48967d015a87ca3c4283ea (diff) | |
parent | a7e30b8d91d3291de4543d97849193ebc3ec4c1c (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
[AVR32] Fix random segfault with preemption
[AVR32] Don't use __builtin_xchg()
[AVR32] ngw100 i2c-gpio tweaks
[AVR32] Ignore a few irrelevant syscalls
[AVR32] SMC configuration in clock cycles
[AVR32] Drop support for redundant "keepinitrd" boot-time parm.
[AVR32] Make dma_sync_*_for_cpu no-ops
[AVR32] Remove unneeded 8K alignment of .text section
[AVR32] Kill a few hardcoded constants in vmlinux.lds
[AVR32] rename vmlinux.lds
[AVR32] fix command line parsing in early_parse_fbmem
[AVR32] checkstack support
[AVR32] Wire up USBA device
[AVR32] add multidrive support for pio driver
[AVR32] /sys/kernel/debug/at32ap_clk
[AVR32] Move AT32_PM_BASE definition into pm.h
Diffstat (limited to 'include/asm-avr32/system.h')
-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 a8236bacc87..dc2d527cef4 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 *, extern void __xchg_called_with_bad_pointer(void); -#ifdef __CHECKER__ -extern unsigned long __builtin_xchg(void *ptr, unsigned long x); -#endif +static inline unsigned long xchg_u32(u32 val, volatile u32 *m) +{ + u32 ret; -#define xchg_u32(val, m) __builtin_xchg((void *)m, val) + asm volatile("xchg %[ret], %[m], %[val]" + : [ret] "=&r"(ret), "=m"(*m) + : "m"(*m), [m] "r"(m), [val] "r"(val) + : "memory"); + return ret; +} static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |