arm64: cmpxchg: avoid "cc" clobber in ll/sc routines
authorWill Deacon <will.deacon@arm.com>
Fri, 29 May 2015 13:26:59 +0000 (14:26 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 14:28:52 +0000 (15:28 +0100)
commit0bc671d3f4bee9c31110d096ada0de52380e693d
tree63c5120264072fa4599fc6fe0f92f6a044d48f0c
parente9a4b795652f654a7870727e5333c1b709b8736c
arm64: cmpxchg: avoid "cc" clobber in ll/sc routines

We can perform the cmpxchg comparison using eor and cbnz which avoids
the "cc" clobber for the ll/sc case and consequently for the LSE case
where we may have to fall-back on the ll/sc code at runtime.

Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/atomic_ll_sc.h
arch/arm64/include/asm/atomic_lse.h