ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64
authorWill Deacon <will.deacon@arm.com>
Fri, 27 Apr 2012 11:49:16 +0000 (12:49 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 28 Apr 2012 16:32:44 +0000 (17:32 +0100)
commit3e0f5a15f5003f4576c35498814f0f1567860449
tree67f8375e553faf2a732f22f5283d64bbb6ee8a34
parent0bd82adee38046fcf180a60ca56c181702287646
ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64

The cmpxchg64 routines for ARMv6+ CPUs replicate inline assembly that
already exists for atomic64 operations. Furthermore, the cmpxchg64 code
uses the "memory" constraint in the clobber list rather than identifying
the region of memory that is actually modified.

This patch replaces the ARMv6+ cmpxchg64 code with macros that expand to
the atomic64_ and local64_ variants, casting the pointer parameter to
the appropriate container type.

Cc: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/cmpxchg.h