ARM: 5889/1: Add atomic64 routines for ARMv6k and above.
authorWill Deacon <will.deacon@arm.com>
Wed, 20 Jan 2010 18:05:07 +0000 (19:05 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 15 Feb 2010 21:39:50 +0000 (21:39 +0000)
commit24b44a66fa240f6fc63343623ca730d39754047e
treec271eea37b9559a06b11eb87743856be9a254663
parenta9221de66d2d94e6e34c3f56bbdd744935020737
ARM: 5889/1: Add atomic64 routines for ARMv6k and above.

In preparation for perf-events support, ARM needs to support atomic64_t
operations. v6k and above support the ldrexd and strexd instructions to
do just that.

This patch adds atomic64 support to the ARM architecture. v6k and above
make use of new instructions whilst older cores fall back on the generic
solution using spinlocks. If and when v7-M cores are supported by Linux,
they will need to fall back on the spinlock implementation too.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/include/asm/atomic.h