@@ -46,7 +46,8 @@ static __always_inline bool static_key_false(struct static_key *key);
static inline void __ticket_enter_slowpath(arch_spinlock_t *lock)
{
- set_bit(0, (volatile unsigned long *)&lock->tickets.head);
+ set_bit(TICKET_SLOWPATH_BIT,
+ (volatile unsigned long *)&lock->tickets.head);
}
#else /* !CONFIG_PARAVIRT_SPINLOCKS */
@@ -4,8 +4,9 @@
#include <linux/types.h>
#ifdef CONFIG_PARAVIRT_SPINLOCKS
+#define TICKET_SLOWPATH_BIT 0
#define __TICKET_LOCK_INC 2
-#define TICKET_SLOWPATH_FLAG ((__ticket_t)1)
+#define TICKET_SLOWPATH_FLAG ((__ticket_t)(1 << TICKET_SLOWPATH_BIT))
#else
#define __TICKET_LOCK_INC 1
#define TICKET_SLOWPATH_FLAG ((__ticket_t)0)
For paravirtualized spinlocks setting the "slowpath" flag in __ticket_enter_slowpath() is done via setting bit "0" in lock->tickets.head instead of using a macro. Change this by defining an appropriate macro. Signed-off-by: Juergen Gross <jgross@suse.com> --- arch/x86/include/asm/spinlock.h | 3 ++- arch/x86/include/asm/spinlock_types.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)