License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[sfrench/cifs-2.6.git] / arch / x86 / include / asm / spinlock_types.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_SPINLOCK_TYPES_H
3 #define _ASM_X86_SPINLOCK_TYPES_H
4
5 #include <linux/types.h>
6
7 #ifdef CONFIG_PARAVIRT_SPINLOCKS
8 #define __TICKET_LOCK_INC       2
9 #define TICKET_SLOWPATH_FLAG    ((__ticket_t)1)
10 #else
11 #define __TICKET_LOCK_INC       1
12 #define TICKET_SLOWPATH_FLAG    ((__ticket_t)0)
13 #endif
14
15 #if (CONFIG_NR_CPUS < (256 / __TICKET_LOCK_INC))
16 typedef u8  __ticket_t;
17 typedef u16 __ticketpair_t;
18 #else
19 typedef u16 __ticket_t;
20 typedef u32 __ticketpair_t;
21 #endif
22
23 #define TICKET_LOCK_INC ((__ticket_t)__TICKET_LOCK_INC)
24
25 #define TICKET_SHIFT    (sizeof(__ticket_t) * 8)
26
27 #include <asm-generic/qspinlock_types.h>
28
29 #include <asm-generic/qrwlock_types.h>
30
31 #endif /* _ASM_X86_SPINLOCK_TYPES_H */