mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Peter Zijlstra](/assets/img/avatar_default.png)
We've unconditionally used the queued spinlock for many releases now. Its time to remove the old ticket lock code. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <waiman.long@hpe.com> Cc: Waiman.Long@hpe.com Cc: david.vrabel@citrix.com Cc: dhowells@redhat.com Cc: pbonzini@redhat.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20160518184302.GO3193@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
30 lines
680 B
C
30 lines
680 B
C
#ifndef _ASM_X86_SPINLOCK_TYPES_H
|
|
#define _ASM_X86_SPINLOCK_TYPES_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#ifdef CONFIG_PARAVIRT_SPINLOCKS
|
|
#define __TICKET_LOCK_INC 2
|
|
#define TICKET_SLOWPATH_FLAG ((__ticket_t)1)
|
|
#else
|
|
#define __TICKET_LOCK_INC 1
|
|
#define TICKET_SLOWPATH_FLAG ((__ticket_t)0)
|
|
#endif
|
|
|
|
#if (CONFIG_NR_CPUS < (256 / __TICKET_LOCK_INC))
|
|
typedef u8 __ticket_t;
|
|
typedef u16 __ticketpair_t;
|
|
#else
|
|
typedef u16 __ticket_t;
|
|
typedef u32 __ticketpair_t;
|
|
#endif
|
|
|
|
#define TICKET_LOCK_INC ((__ticket_t)__TICKET_LOCK_INC)
|
|
|
|
#define TICKET_SHIFT (sizeof(__ticket_t) * 8)
|
|
|
|
#include <asm-generic/qspinlock_types.h>
|
|
|
|
#include <asm-generic/qrwlock_types.h>
|
|
|
|
#endif /* _ASM_X86_SPINLOCK_TYPES_H */
|