]> git.baikalelectronics.ru Git - kernel.git/commit
[AVR32] Don't use __builtin_xchg()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 3 Oct 2007 13:05:20 +0000 (15:05 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 11 Oct 2007 11:32:56 +0000 (13:32 +0200)
commit802c65fabff2b872c0a81abacbd90e6aa9cdd032
treef44d5d49cf4d95c57e067bd004fe99d072625d7d
parent6dec11f084c49f902a8f67247a4011f8b6fc489c
[AVR32] Don't use __builtin_xchg()

The implementation of __builtin_xchg() in at least some versions of
avr32 gcc is buggy. Rather than find out exactly which versions that
have this bug, let's just avoid the problem altogether by implementing
xchg() in inline assembly.

Also, in most architectures, xchg() seems to imply a memory barrier,
while the existing avr32 implementation did not. This patch also fixes
that discrepancy.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
include/asm-avr32/system.h