Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 775ebcc1 authored by Will Deacon's avatar Will Deacon Committed by Russell King
Browse files

ARM: 7853/1: cmpxchg: implement cmpxchg64_relaxed



This patch introduces cmpxchg64_relaxed for arm, which performs a 64-bit
cmpxchg operation without barrier semantics. cmpxchg64_local is updated
to use the new operation.

Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2523c67b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -270,11 +270,13 @@ static inline unsigned long long __cmpxchg64_mb(unsigned long long *ptr,
					(unsigned long long)(o),	\
					(unsigned long long)(n)))

#define cmpxchg64_local(ptr, o, n)					\
#define cmpxchg64_relaxed(ptr, o, n)					\
	((__typeof__(*(ptr)))__cmpxchg64((ptr),				\
					(unsigned long long)(o),	\
					(unsigned long long)(n)))

#define cmpxchg64_local(ptr, o, n)	cmpxchg64_relaxed((ptr), (o), (n))

#endif	/* __LINUX_ARM_ARCH__ >= 6 */

#endif /* __ASM_ARM_CMPXCHG_H */