summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong Zhang <yong.zhang at windriver.com>2015-01-29 12:56:18 -0600
committerSteven Rostedt <rostedt@goodmis.org>2016-06-24 16:32:55 -0400
commit33c0cba3cd55e243dcd8842b4ba6e726e826bfa6 (patch)
tree9a6da3be3b7ed9f327bcf74b3b6e04a91cef8c19
parent1fdf0887165f7f71e1062bdd93512f8e0b426d56 (diff)
downloadlinux-rt-33c0cba3cd55e243dcd8842b4ba6e726e826bfa6.tar.gz
ARM: cmpxchg: define __HAVE_ARCH_CMPXCHG for armv6 and later
Both pi_stress and sigwaittest in rt-test show performance gain with __HAVE_ARCH_CMPXCHG. Testing result on coretile_express_a9x4: pi_stress -p 99 --duration=300 (on linux-3.4-rc5; bigger is better) vanilla: Total inversion performed: 5493381 patched: Total inversion performed: 5621746 sigwaittest -p 99 -l 100000 (on linux-3.4-rc5-rt6; less is better) 3.4-rc5-rt6: Min 24, Cur 27, Avg 30, Max 98 patched: Min 19, Cur 21, Avg 23, Max 96 Signed-off-by: Yong Zhang <yong.zhang0 at gmail.com> Cc: Russell King <rmk+kernel at arm.linux.org.uk> Cc: Nicolas Pitre <nico at linaro.org> Cc: Will Deacon <will.deacon at arm.com> Cc: Catalin Marinas <catalin.marinas at arm.com> Cc: Thomas Gleixner <tglx at linutronix.de> Cc: linux-arm-kernel at lists.infradead.org Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--arch/arm/include/asm/cmpxchg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h
index d41d7cbf0ada..249dfc34a36f 100644
--- a/arch/arm/include/asm/cmpxchg.h
+++ b/arch/arm/include/asm/cmpxchg.h
@@ -127,6 +127,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
#else /* min ARCH >= ARMv6 */
+#define __HAVE_ARCH_CMPXCHG 1
+
extern void __bad_cmpxchg(volatile void *ptr, int size);
/*