Hi all, Today's linux-next merge of the tip tree got a conflict in arch/x86/include/asm/spinlock.h between commit bc08b449ee14 ("lockref: implement lockless reference count updates using cmpxchg()") from Linus' tree and commit 545ac13892ab ("x86, spinlock: Replace pv spinlocks with pv ticketlocks") from the tip tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au diff --cc arch/x86/include/asm/spinlock.h index e0e6684,8963bfe..0000000 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h @@@ -34,11 -37,31 +37,36 @@@ # define UNLOCK_LOCK_PREFIX #endif +static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) +{ + return lock.tickets.head == lock.tickets.tail; +} + + /* How long a lock should spin before we consider blocking */ + #define SPIN_THRESHOLD (1 << 15) + + extern struct static_key paravirt_ticketlocks_enabled; + static __always_inline bool static_key_false(struct static_key *key); + + #ifdef CONFIG_PARAVIRT_SPINLOCKS + + static inline void __ticket_enter_slowpath(arch_spinlock_t *lock) + { + set_bit(0, (volatile unsigned long *)&lock->tickets.tail); + } + + #else /* !CONFIG_PARAVIRT_SPINLOCKS */ + static __always_inline void __ticket_lock_spinning(arch_spinlock_t *lock, + __ticket_t ticket) + { + } + static inline void __ticket_unlock_kick(arch_spinlock_t *lock, + __ticket_t ticket) + { + } + + #endif /* CONFIG_PARAVIRT_SPINLOCKS */ + /* * Ticket locks are conceptually two parts, one indicating the current head of * the queue, and the other indicating the current tail. The lock is acquired