arm64: atomics: tidy up common atomic{,64}_* macros
authorWill Deacon <will.deacon@arm.com>
Thu, 4 Jun 2015 15:41:36 +0000 (16:41 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 14:28:53 +0000 (15:28 +0100)
commita82e62382fcbbf5c3348e802af73583e0cac39c0
tree01e8ff2e9c9ab4b937ef15de980a31cdcee2db27
parent4e39715f4b5cb3b44576fedb2d38aca87de3cf48
arm64: atomics: tidy up common atomic{,64}_* macros

The common (i.e. identical for ll/sc and lse) atomic macros in atomic.h
are needlessley different for atomic_t and atomic64_t.

This patch tidies up the definitions to make them consistent across the
two atomic types and factors out common code such as the add_unless
implementation based on cmpxchg.

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