]> git.baikalelectronics.ru Git - kernel.git/commit
sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks
authorAndreas Larsson <andreas@gaisler.com>
Wed, 5 Nov 2014 14:52:08 +0000 (15:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Nov 2014 20:51:44 +0000 (12:51 -0800)
commit950e948e430ee10c104e6d7f7ff086a8474c666f
tree1590a724b9a40458ba1a990ceb41fc51839196fc
parent5c1678543794f63cc94f273bf41d4fc3ca0aa9c4
sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks

Atomicity between xchg and cmpxchg cannot be guaranteed when xchg is
implemented with a swap and cmpxchg is implemented with locks.
Without this, e.g. mcs_spin_lock and mcs_spin_unlock are broken.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/atomic_32.h
arch/sparc/include/asm/cmpxchg_32.h
arch/sparc/lib/atomic32.c