]> git.baikalelectronics.ru Git - kernel.git/commit
[ARM] 3165/1: fix atomic_cmpxchg() implementation for ARMv6+
authorNicolas Pitre <nico@cam.org>
Wed, 16 Nov 2005 15:05:11 +0000 (15:05 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 16 Nov 2005 15:05:11 +0000 (15:05 +0000)
commit5ee796d00d6b9b713c91866dde801dff4c52d778
treecbe903bef21fce0d5923cc83071b7b66d00d94c4
parent7f563aaa417d4e5736e702db24e3c9a172207856
[ARM] 3165/1: fix atomic_cmpxchg() implementation for ARMv6+

Patch from Nicolas Pitre

If 'old' and 'oldval' are different then 'res' never gets set.  In that
case, if ever %0 happened to contain anything but zero (rather likely)
then the code will loop forever (or until another CPU just come along
and change the atomic value to match 'old' which is rather unlikely).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/atomic.h