diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-31 15:01:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-31 15:01:08 -0700 |
commit | 7b8067d37058ec01889513e16033fb6de72a98ce (patch) | |
tree | 697e66a89f37eeaf223f1e62d4ac1a5b3b6e6d90 /arch | |
parent | 9551bf292d67e9070409b59685cdb8fc5437ec3a (diff) | |
parent | 8f8dcb3f7fe4febbfa96e64d4ad47de958c5cc34 (diff) | |
download | linux-7b8067d37058ec01889513e16033fb6de72a98ce.tar.bz2 |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha
Pull alpha update from Matt Turner:
"A single patch for alpha, one that enables ARCH_USE_CMPXCHG_LOCKREF
and offers around an 8% performance improvement on a little benchmark
that you wrote"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/Kconfig | 1 | ||||
-rw-r--r-- | arch/alpha/include/asm/spinlock.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index bf9e9d3b3792..f515a4dbf7a0 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -3,6 +3,7 @@ config ALPHA default y select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO + select ARCH_USE_CMPXCHG_LOCKREF select HAVE_AOUT select HAVE_IDE select HAVE_OPROFILE diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h index 37b570d01202..fed9c6f44c19 100644 --- a/arch/alpha/include/asm/spinlock.h +++ b/arch/alpha/include/asm/spinlock.h @@ -16,6 +16,11 @@ #define arch_spin_unlock_wait(x) \ do { cpu_relax(); } while ((x)->lock) +static inline int arch_spin_value_unlocked(arch_spinlock_t lock) +{ + return lock.lock == 0; +} + static inline void arch_spin_unlock(arch_spinlock_t * lock) { mb(); |