diff options
author | David Vrabel <david.vrabel@citrix.com> | 2014-04-28 10:31:04 +0100 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-04-28 10:31:04 +0100 |
commit | 67dadcb324c2fe059cb2c35f8b80df42bb23f7c4 (patch) | |
tree | 3521a2a9e05a7de426ab50bc7685489ad6340e54 /arch/arm/include/asm/cmpxchg.h | |
parent | eb47f71200b7d5b4c8c1f8c75675f592d855aafd (diff) | |
parent | e26a9e00afc482b971afcaef1db8c9034d4d6d7c (diff) | |
download | linux-67dadcb324c2fe059cb2c35f8b80df42bb23f7c4.tar.bz2 |
Merge commit 'e26a9e0' into stable/for-linus-3.15
Diffstat (limited to 'arch/arm/include/asm/cmpxchg.h')
-rw-r--r-- | arch/arm/include/asm/cmpxchg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h index df2fbba7efc8..abb2c3769b01 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h @@ -2,6 +2,7 @@ #define __ASM_ARM_CMPXCHG_H #include <linux/irqflags.h> +#include <linux/prefetch.h> #include <asm/barrier.h> #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) @@ -35,6 +36,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size #endif smp_mb(); + prefetchw((const void *)ptr); switch (size) { #if __LINUX_ARM_ARCH__ >= 6 @@ -138,6 +140,8 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, { unsigned long oldval, res; + prefetchw((const void *)ptr); + switch (size) { #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ case 1: @@ -230,6 +234,8 @@ static inline unsigned long long __cmpxchg64(unsigned long long *ptr, unsigned long long oldval; unsigned long res; + prefetchw(ptr); + __asm__ __volatile__( "1: ldrexd %1, %H1, [%3]\n" " teq %1, %4\n" |