aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-12-03 14:01:19 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-12-14 17:55:32 -0500
commitfb3a6bbc912b12347614e5742c7c61416cdb0ca0 (patch)
treef9dbf8dab23cea6f033a58672ba16abf2ae09ebd /arch/s390
parent0199c4e68d1f02894bdefe4b5d9e9ee4aedd8d62 (diff)
locking: Convert raw_rwlock to arch_rwlock
Not strictly necessary for -rt as -rt does not have non sleeping rwlocks, but it's odd to not have a consistent naming convention. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: linux-arch@vger.kernel.org
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/spinlock.h30
-rw-r--r--arch/s390/include/asm/spinlock_types.h4
-rw-r--r--arch/s390/lib/spinlock.c12
3 files changed, 23 insertions, 23 deletions
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h
index a94c146657a9..7f98f0e48acb 100644
--- a/arch/s390/include/asm/spinlock.h
+++ b/arch/s390/include/asm/spinlock.h
@@ -121,14 +121,14 @@ static inline void arch_spin_unlock(arch_spinlock_t *lp)
121 */ 121 */
122#define __raw_write_can_lock(x) ((x)->lock == 0) 122#define __raw_write_can_lock(x) ((x)->lock == 0)
123 123
124extern void _raw_read_lock_wait(raw_rwlock_t *lp); 124extern void _raw_read_lock_wait(arch_rwlock_t *lp);
125extern void _raw_read_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); 125extern void _raw_read_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags);
126extern int _raw_read_trylock_retry(raw_rwlock_t *lp); 126extern int _raw_read_trylock_retry(arch_rwlock_t *lp);
127extern void _raw_write_lock_wait(raw_rwlock_t *lp); 127extern void _raw_write_lock_wait(arch_rwlock_t *lp);
128extern void _raw_write_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); 128extern void _raw_write_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags);
129extern int _raw_write_trylock_retry(raw_rwlock_t *lp); 129extern int _raw_write_trylock_retry(arch_rwlock_t *lp);
130 130
131static inline void __raw_read_lock(raw_rwlock_t *rw) 131static inline void __raw_read_lock(arch_rwlock_t *rw)
132{ 132{
133 unsigned int old; 133 unsigned int old;
134 old = rw->lock & 0x7fffffffU; 134 old = rw->lock & 0x7fffffffU;
@@ -136,7 +136,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
136 _raw_read_lock_wait(rw); 136 _raw_read_lock_wait(rw);
137} 137}
138 138
139static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags) 139static inline void __raw_read_lock_flags(arch_rwlock_t *rw, unsigned long flags)
140{ 140{
141 unsigned int old; 141 unsigned int old;
142 old = rw->lock & 0x7fffffffU; 142 old = rw->lock & 0x7fffffffU;
@@ -144,7 +144,7 @@ static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags)
144 _raw_read_lock_wait_flags(rw, flags); 144 _raw_read_lock_wait_flags(rw, flags);
145} 145}
146 146
147static inline void __raw_read_unlock(raw_rwlock_t *rw) 147static inline void __raw_read_unlock(arch_rwlock_t *rw)
148{ 148{
149 unsigned int old, cmp; 149 unsigned int old, cmp;
150 150
@@ -155,24 +155,24 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
155 } while (cmp != old); 155 } while (cmp != old);
156} 156}
157 157
158static inline void __raw_write_lock(raw_rwlock_t *rw) 158static inline void __raw_write_lock(arch_rwlock_t *rw)
159{ 159{
160 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) 160 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0))
161 _raw_write_lock_wait(rw); 161 _raw_write_lock_wait(rw);
162} 162}
163 163
164static inline void __raw_write_lock_flags(raw_rwlock_t *rw, unsigned long flags) 164static inline void __raw_write_lock_flags(arch_rwlock_t *rw, unsigned long flags)
165{ 165{
166 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) 166 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0))
167 _raw_write_lock_wait_flags(rw, flags); 167 _raw_write_lock_wait_flags(rw, flags);
168} 168}
169 169
170static inline void __raw_write_unlock(raw_rwlock_t *rw) 170static inline void __raw_write_unlock(arch_rwlock_t *rw)
171{ 171{
172 _raw_compare_and_swap(&rw->lock, 0x80000000, 0); 172 _raw_compare_and_swap(&rw->lock, 0x80000000, 0);
173} 173}
174 174
175static inline int __raw_read_trylock(raw_rwlock_t *rw) 175static inline int __raw_read_trylock(arch_rwlock_t *rw)
176{ 176{
177 unsigned int old; 177 unsigned int old;
178 old = rw->lock & 0x7fffffffU; 178 old = rw->lock & 0x7fffffffU;
@@ -181,7 +181,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
181 return _raw_read_trylock_retry(rw); 181 return _raw_read_trylock_retry(rw);
182} 182}
183 183
184static inline int __raw_write_trylock(raw_rwlock_t *rw) 184static inline int __raw_write_trylock(arch_rwlock_t *rw)
185{ 185{
186 if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)) 186 if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0))
187 return 1; 187 return 1;
diff --git a/arch/s390/include/asm/spinlock_types.h b/arch/s390/include/asm/spinlock_types.h
index e25c0370f6cd..9c76656a0af0 100644
--- a/arch/s390/include/asm/spinlock_types.h
+++ b/arch/s390/include/asm/spinlock_types.h
@@ -13,8 +13,8 @@ typedef struct {
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index f4596452f072..09fee9a1aa15 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -105,7 +105,7 @@ void arch_spin_relax(arch_spinlock_t *lock)
105} 105}
106EXPORT_SYMBOL(arch_spin_relax); 106EXPORT_SYMBOL(arch_spin_relax);
107 107
108void _raw_read_lock_wait(raw_rwlock_t *rw) 108void _raw_read_lock_wait(arch_rwlock_t *rw)
109{ 109{
110 unsigned int old; 110 unsigned int old;
111 int count = spin_retry; 111 int count = spin_retry;
@@ -124,7 +124,7 @@ void _raw_read_lock_wait(raw_rwlock_t *rw)
124} 124}
125EXPORT_SYMBOL(_raw_read_lock_wait); 125EXPORT_SYMBOL(_raw_read_lock_wait);
126 126
127void _raw_read_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags) 127void _raw_read_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
128{ 128{
129 unsigned int old; 129 unsigned int old;
130 int count = spin_retry; 130 int count = spin_retry;
@@ -145,7 +145,7 @@ void _raw_read_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
145} 145}
146EXPORT_SYMBOL(_raw_read_lock_wait_flags); 146EXPORT_SYMBOL(_raw_read_lock_wait_flags);
147 147
148int _raw_read_trylock_retry(raw_rwlock_t *rw) 148int _raw_read_trylock_retry(arch_rwlock_t *rw)
149{ 149{
150 unsigned int old; 150 unsigned int old;
151 int count = spin_retry; 151 int count = spin_retry;
@@ -161,7 +161,7 @@ int _raw_read_trylock_retry(raw_rwlock_t *rw)
161} 161}
162EXPORT_SYMBOL(_raw_read_trylock_retry); 162EXPORT_SYMBOL(_raw_read_trylock_retry);
163 163
164void _raw_write_lock_wait(raw_rwlock_t *rw) 164void _raw_write_lock_wait(arch_rwlock_t *rw)
165{ 165{
166 int count = spin_retry; 166 int count = spin_retry;
167 167
@@ -178,7 +178,7 @@ void _raw_write_lock_wait(raw_rwlock_t *rw)
178} 178}
179EXPORT_SYMBOL(_raw_write_lock_wait); 179EXPORT_SYMBOL(_raw_write_lock_wait);
180 180
181void _raw_write_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags) 181void _raw_write_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
182{ 182{
183 int count = spin_retry; 183 int count = spin_retry;
184 184
@@ -197,7 +197,7 @@ void _raw_write_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
197} 197}
198EXPORT_SYMBOL(_raw_write_lock_wait_flags); 198EXPORT_SYMBOL(_raw_write_lock_wait_flags);
199 199
200int _raw_write_trylock_retry(raw_rwlock_t *rw) 200int _raw_write_trylock_retry(arch_rwlock_t *rw)
201{ 201{
202 int count = spin_retry; 202 int count = spin_retry;
203 203