Skip to contentSkip to conversation

alpha.git

GIT PULL Matt Turner 1 participant 1 message Aug 31, 2015

Subsystems (2)
lore
Share & tools
lore

Matt Turner

author maintainer
#0 lore raw

Hi Linus,

Please pull 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.

Thanks,
Matt

The following changes since commit 64291f7db5bd8150a74ad2036f1037e6a0428df2:

Linux 4.2 (2015-08-30 11:34:09 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git for-linus

for you to fetch changes up to 8f8dcb3f7fe4febbfa96e64d4ad47de958c5cc34:

alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF. (2015-08-30 18:01:16 -0700)

----------------------------------------------------------------
Matt Turner (1):
alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF.

 arch/alpha/Kconfig                | 1 +
 arch/alpha/include/asm/spinlock.h | 5 +++++
 2 files changed, 6 insertions(+)
arch/alpha/Kconfig +1 -0
index bf9e9d3..f515a4d 100644
@@ -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
arch/alpha/include/asm/spinlock.h +5 -0
index 37b570d..fed9c6f 100644
@@ -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();