* [PATCH] lockref: Implement lockref for Itanium
@ 2013-09-03 22:31 Luck, Tony
0 siblings, 0 replies; only message in thread
From: Luck, Tony @ 2013-09-03 22:31 UTC (permalink / raw)
To: linux-ia64
All the cool kids are doing this, join in the fun.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
arch/ia64/Kconfig | 1 +
arch/ia64/include/asm/spinlock.h | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 5a768ad..a486442 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -43,6 +43,7 @@ config IA64
select SYSCTL_ARCH_UNALIGN_NO_WARN
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_RELA
+ select ARCH_USE_CMPXCHG_LOCKREF
default y
help
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 54ff557..45698cd 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)
return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1;
}
+static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock)
+{
+ return !(((lock.lock >> TICKET_SHIFT) ^ lock.lock) & TICKET_MASK);
+}
+
static inline int arch_spin_is_locked(arch_spinlock_t *lock)
{
return __ticket_spin_is_locked(lock);
--
1.8.1.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-03 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 22:31 [PATCH] lockref: Implement lockref for Itanium Luck, Tony
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.