diff options
Diffstat (limited to 'arch/s390/include/asm/rwsem.h')
-rw-r--r-- | arch/s390/include/asm/rwsem.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/s390/include/asm/rwsem.h b/arch/s390/include/asm/rwsem.h index 6e075f1d97b4..f0f527756ee1 100644 --- a/arch/s390/include/asm/rwsem.h +++ b/arch/s390/include/asm/rwsem.h | |||
@@ -64,41 +64,6 @@ extern struct rw_semaphore *rwsem_downgrade_write(struct rw_semaphore *); | |||
64 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 64 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * initialisation | ||
68 | */ | ||
69 | |||
70 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
71 | # define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } | ||
72 | #else | ||
73 | # define __RWSEM_DEP_MAP_INIT(lockname) | ||
74 | #endif | ||
75 | |||
76 | #define __RWSEM_INITIALIZER(name) \ | ||
77 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait.lock), \ | ||
78 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } | ||
79 | |||
80 | #define DECLARE_RWSEM(name) \ | ||
81 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
82 | |||
83 | static inline void init_rwsem(struct rw_semaphore *sem) | ||
84 | { | ||
85 | sem->count = RWSEM_UNLOCKED_VALUE; | ||
86 | spin_lock_init(&sem->wait_lock); | ||
87 | INIT_LIST_HEAD(&sem->wait_list); | ||
88 | } | ||
89 | |||
90 | extern void __init_rwsem(struct rw_semaphore *sem, const char *name, | ||
91 | struct lock_class_key *key); | ||
92 | |||
93 | #define init_rwsem(sem) \ | ||
94 | do { \ | ||
95 | static struct lock_class_key __key; \ | ||
96 | \ | ||
97 | __init_rwsem((sem), #sem, &__key); \ | ||
98 | } while (0) | ||
99 | |||
100 | |||
101 | /* | ||
102 | * lock for reading | 67 | * lock for reading |
103 | */ | 68 | */ |
104 | static inline void __down_read(struct rw_semaphore *sem) | 69 | static inline void __down_read(struct rw_semaphore *sem) |