ARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock
authorWill Deacon <will.deacon@arm.com>
Wed, 5 Jun 2013 10:27:26 +0000 (11:27 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 Jun 2013 08:27:04 +0000 (09:27 +0100)
An exclusive store instruction may fail for reasons other than lock
contention (e.g. a cache eviction during the critical section) so, in
line with other architectures using similar exclusive instructions
(alpha, mips, powerpc), retry the trylock operation if the lock appears
to be free but the strex reported failure.

Reported-by: Tony Thompson <anthony.thompson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

No differences found