Merge tag 'asoc-fix-v4.14-rc6' into asoc-linus
[sfrench/cifs-2.6.git] / arch / arm / include / asm / spinlock_types.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SPINLOCK_TYPES_H
3 #define __ASM_SPINLOCK_TYPES_H
4
5 #ifndef __LINUX_SPINLOCK_TYPES_H
6 # error "please don't include this file directly"
7 #endif
8
9 #define TICKET_SHIFT    16
10
11 typedef struct {
12         union {
13                 u32 slock;
14                 struct __raw_tickets {
15 #ifdef __ARMEB__
16                         u16 next;
17                         u16 owner;
18 #else
19                         u16 owner;
20                         u16 next;
21 #endif
22                 } tickets;
23         };
24 } arch_spinlock_t;
25
26 #define __ARCH_SPIN_LOCK_UNLOCKED       { { 0 } }
27
28 typedef struct {
29         u32 lock;
30 } arch_rwlock_t;
31
32 #define __ARCH_RW_LOCK_UNLOCKED         { 0 }
33
34 #endif