]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb805bed34d478937a8b1db98a392cb560b837983
tree67f8375e553faf2a732f22f5283d64bbb6ee8a34
parent8840fb1f4e63a12bfc28fb422a0ebb958beff5ed
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