summaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLuck, Tony <tony.luck@intel.com>2013-09-03 18:31:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-04 20:18:56 -0400
commit71c7356f864dc41e4bd6b884596a422f8954afe0 (patch)
tree9a5d09111a37dd40149d676fa87892068f27d530 /arch/ia64
parent977dbfcf8e9ff1783355b260d93101af315de18a (diff)
lockref: Implement lockref for Itanium
All the cool kids are doing this, join in the fun. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/ia64/include/asm/spinlock.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index b36370d3eab9..566642266324 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -43,6 +43,7 @@ config IA64
43 select SYSCTL_ARCH_UNALIGN_NO_WARN 43 select SYSCTL_ARCH_UNALIGN_NO_WARN
44 select HAVE_MOD_ARCH_SPECIFIC 44 select HAVE_MOD_ARCH_SPECIFIC
45 select MODULES_USE_ELF_RELA 45 select MODULES_USE_ELF_RELA
46 select ARCH_USE_CMPXCHG_LOCKREF
46 default y 47 default y
47 help 48 help
48 The Itanium Processor Family is Intel's 64-bit successor to 49 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
index 54ff557d474e..45698cd15b7b 100644
--- a/arch/ia64/include/asm/spinlock.h
+++ b/arch/ia64/include/asm/spinlock.h
@@ -102,6 +102,11 @@ static inline int __ticket_spin_is_contended(arch_spinlock_t *lock)
102 return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1; 102 return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1;
103} 103}
104 104
105static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock)
106{
107 return !(((lock.lock >> TICKET_SHIFT) ^ lock.lock) & TICKET_MASK);
108}
109
105static inline int arch_spin_is_locked(arch_spinlock_t *lock) 110static inline int arch_spin_is_locked(arch_spinlock_t *lock)
106{ 111{
107 return __ticket_spin_is_locked(lock); 112 return __ticket_spin_is_locked(lock);