]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
arm64: xchg: patch in lse instructions when supported by the CPU
authorWill Deacon <will.deacon@arm.com>
Tue, 31 Mar 2015 13:11:24 +0000 (14:11 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 14:28:51 +0000 (15:28 +0100)
commitc8366ba0fb65063b6b4f69c7af1ea74152435590
tree5e1b7a728baa9428185c8339d33344cf35037b8d
parent084f903727e1c3a61d6bcdaeeed30bddc6d7f65a
arm64: xchg: patch in lse instructions when supported by the CPU

On CPUs which support the LSE atomic instructions introduced in ARMv8.1,
it makes sense to use them in preference to ll/sc sequences.

This patch introduces runtime patching of our xchg primitives so that
the LSE swp instruction (yes, you read right!) is used instead.

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/cmpxchg.h