x86, locking/spinlocks: Remove ticket (spin)lock implementation
[cascardo/linux.git] / arch / x86 / include / asm / spinlock_types.h
1 #ifndef _ASM_X86_SPINLOCK_TYPES_H
2 #define _ASM_X86_SPINLOCK_TYPES_H
3
4 #include <linux/types.h>
5
6 #ifdef CONFIG_PARAVIRT_SPINLOCKS
7 #define __TICKET_LOCK_INC       2
8 #define TICKET_SLOWPATH_FLAG    ((__ticket_t)1)
9 #else
10 #define __TICKET_LOCK_INC       1
11 #define TICKET_SLOWPATH_FLAG    ((__ticket_t)0)
12 #endif
13
14 #if (CONFIG_NR_CPUS < (256 / __TICKET_LOCK_INC))
15 typedef u8  __ticket_t;
16 typedef u16 __ticketpair_t;
17 #else
18 typedef u16 __ticket_t;
19 typedef u32 __ticketpair_t;
20 #endif
21
22 #define TICKET_LOCK_INC ((__ticket_t)__TICKET_LOCK_INC)
23
24 #define TICKET_SHIFT    (sizeof(__ticket_t) * 8)
25
26 #include <asm-generic/qspinlock_types.h>
27
28 #include <asm-generic/qrwlock_types.h>
29
30 #endif /* _ASM_X86_SPINLOCK_TYPES_H */