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.
This commit is contained in:
Linus Torvalds 2015-08-31 15:01:08 -07:00
commit 7b8067d370
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ config ALPHA
default y default y
select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO select ARCH_MIGHT_HAVE_PC_SERIO
select ARCH_USE_CMPXCHG_LOCKREF
select HAVE_AOUT select HAVE_AOUT
select HAVE_IDE select HAVE_IDE
select HAVE_OPROFILE select HAVE_OPROFILE

View File

@ -16,6 +16,11 @@
#define arch_spin_unlock_wait(x) \ #define arch_spin_unlock_wait(x) \
do { cpu_relax(); } while ((x)->lock) 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) static inline void arch_spin_unlock(arch_spinlock_t * lock)
{ {
mb(); mb();