Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 6 | * Copyright (C) 1999, 2000, 06 by Ralf Baechle |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 8 | */ |
| 9 | #ifndef _ASM_SPINLOCK_H |
| 10 | #define _ASM_SPINLOCK_H |
| 11 | |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 12 | #include <asm/barrier.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <asm/war.h> |
| 14 | |
| 15 | /* |
| 16 | * Your basic SMP spinlocks, allowing only a single CPU anywhere |
| 17 | */ |
| 18 | |
Ralf Baechle | beb3ca8 | 2005-10-29 19:32:40 +0100 | [diff] [blame] | 19 | #define __raw_spin_is_locked(x) ((x)->lock != 0) |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 20 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) |
| 21 | #define __raw_spin_unlock_wait(x) \ |
Ralf Baechle | beb3ca8 | 2005-10-29 19:32:40 +0100 | [diff] [blame] | 22 | do { cpu_relax(); } while ((x)->lock) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
| 24 | /* |
| 25 | * Simple spin lock operations. There are two variants, one clears IRQ's |
| 26 | * on the local processor, one does not. |
| 27 | * |
| 28 | * We make no fairness assumptions. They have a cost. |
| 29 | */ |
| 30 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 31 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | { |
| 33 | unsigned int tmp; |
| 34 | |
| 35 | if (R10000_LLSC_WAR) { |
| 36 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 37 | " .set noreorder # __raw_spin_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | "1: ll %1, %2 \n" |
| 39 | " bnez %1, 1b \n" |
| 40 | " li %1, 1 \n" |
| 41 | " sc %1, %0 \n" |
| 42 | " beqzl %1, 1b \n" |
| 43 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | " .set reorder \n" |
| 45 | : "=m" (lock->lock), "=&r" (tmp) |
| 46 | : "m" (lock->lock) |
| 47 | : "memory"); |
| 48 | } else { |
| 49 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 50 | " .set noreorder # __raw_spin_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | "1: ll %1, %2 \n" |
| 52 | " bnez %1, 1b \n" |
| 53 | " li %1, 1 \n" |
| 54 | " sc %1, %0 \n" |
| 55 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 56 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | " .set reorder \n" |
| 58 | : "=m" (lock->lock), "=&r" (tmp) |
| 59 | : "m" (lock->lock) |
| 60 | : "memory"); |
| 61 | } |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 62 | |
| 63 | smp_mb(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 66 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | { |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 68 | smp_mb(); |
| 69 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 71 | " .set noreorder # __raw_spin_unlock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | " sw $0, %0 \n" |
| 73 | " .set\treorder \n" |
| 74 | : "=m" (lock->lock) |
| 75 | : "m" (lock->lock) |
| 76 | : "memory"); |
| 77 | } |
| 78 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 79 | static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | { |
| 81 | unsigned int temp, res; |
| 82 | |
| 83 | if (R10000_LLSC_WAR) { |
| 84 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 85 | " .set noreorder # __raw_spin_trylock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | "1: ll %0, %3 \n" |
| 87 | " ori %2, %0, 1 \n" |
| 88 | " sc %2, %1 \n" |
| 89 | " beqzl %2, 1b \n" |
| 90 | " nop \n" |
| 91 | " andi %2, %0, 1 \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | " .set reorder" |
| 93 | : "=&r" (temp), "=m" (lock->lock), "=&r" (res) |
| 94 | : "m" (lock->lock) |
| 95 | : "memory"); |
| 96 | } else { |
| 97 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 98 | " .set noreorder # __raw_spin_trylock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | "1: ll %0, %3 \n" |
| 100 | " ori %2, %0, 1 \n" |
| 101 | " sc %2, %1 \n" |
| 102 | " beqz %2, 1b \n" |
| 103 | " andi %2, %0, 1 \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | " .set reorder" |
| 105 | : "=&r" (temp), "=m" (lock->lock), "=&r" (res) |
| 106 | : "m" (lock->lock) |
| 107 | : "memory"); |
| 108 | } |
| 109 | |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 110 | smp_mb(); |
| 111 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | return res == 0; |
| 113 | } |
| 114 | |
| 115 | /* |
| 116 | * Read-write spinlocks, allowing multiple readers but only one writer. |
| 117 | * |
| 118 | * NOTE! it is quite common to have readers in interrupts but no interrupt |
| 119 | * writers. For those circumstances we can "mix" irq-safe locks - any writer |
| 120 | * needs to get a irq-safe write-lock, but readers can get non-irqsafe |
| 121 | * read-locks. |
| 122 | */ |
| 123 | |
Ralf Baechle | e3c4807 | 2005-02-03 13:34:45 +0000 | [diff] [blame] | 124 | /* |
| 125 | * read_can_lock - would read_trylock() succeed? |
| 126 | * @lock: the rwlock in question. |
| 127 | */ |
| 128 | #define __raw_read_can_lock(rw) ((rw)->lock >= 0) |
| 129 | |
| 130 | /* |
| 131 | * write_can_lock - would write_trylock() succeed? |
| 132 | * @lock: the rwlock in question. |
| 133 | */ |
| 134 | #define __raw_write_can_lock(rw) (!(rw)->lock) |
| 135 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 136 | static inline void __raw_read_lock(raw_rwlock_t *rw) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | { |
| 138 | unsigned int tmp; |
| 139 | |
| 140 | if (R10000_LLSC_WAR) { |
| 141 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 142 | " .set noreorder # __raw_read_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | "1: ll %1, %2 \n" |
| 144 | " bltz %1, 1b \n" |
| 145 | " addu %1, 1 \n" |
| 146 | " sc %1, %0 \n" |
| 147 | " beqzl %1, 1b \n" |
| 148 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | " .set reorder \n" |
| 150 | : "=m" (rw->lock), "=&r" (tmp) |
| 151 | : "m" (rw->lock) |
| 152 | : "memory"); |
| 153 | } else { |
| 154 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 155 | " .set noreorder # __raw_read_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | "1: ll %1, %2 \n" |
| 157 | " bltz %1, 1b \n" |
| 158 | " addu %1, 1 \n" |
| 159 | " sc %1, %0 \n" |
| 160 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 161 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | " .set reorder \n" |
| 163 | : "=m" (rw->lock), "=&r" (tmp) |
| 164 | : "m" (rw->lock) |
| 165 | : "memory"); |
| 166 | } |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 167 | |
| 168 | smp_mb(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | /* Note the use of sub, not subu which will make the kernel die with an |
| 172 | overflow exception if we ever try to unlock an rwlock that is already |
| 173 | unlocked or is being held by a writer. */ |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 174 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | { |
| 176 | unsigned int tmp; |
| 177 | |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 178 | smp_mb(); |
| 179 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | if (R10000_LLSC_WAR) { |
| 181 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 182 | "1: ll %1, %2 # __raw_read_unlock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | " sub %1, 1 \n" |
| 184 | " sc %1, %0 \n" |
| 185 | " beqzl %1, 1b \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | : "=m" (rw->lock), "=&r" (tmp) |
| 187 | : "m" (rw->lock) |
| 188 | : "memory"); |
| 189 | } else { |
| 190 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 191 | " .set noreorder # __raw_read_unlock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 192 | "1: ll %1, %2 \n" |
| 193 | " sub %1, 1 \n" |
| 194 | " sc %1, %0 \n" |
| 195 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 196 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | " .set reorder \n" |
| 198 | : "=m" (rw->lock), "=&r" (tmp) |
| 199 | : "m" (rw->lock) |
| 200 | : "memory"); |
| 201 | } |
| 202 | } |
| 203 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 204 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | { |
| 206 | unsigned int tmp; |
| 207 | |
| 208 | if (R10000_LLSC_WAR) { |
| 209 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 210 | " .set noreorder # __raw_write_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | "1: ll %1, %2 \n" |
| 212 | " bnez %1, 1b \n" |
| 213 | " lui %1, 0x8000 \n" |
| 214 | " sc %1, %0 \n" |
| 215 | " beqzl %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 216 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | " .set reorder \n" |
| 218 | : "=m" (rw->lock), "=&r" (tmp) |
| 219 | : "m" (rw->lock) |
| 220 | : "memory"); |
| 221 | } else { |
| 222 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 223 | " .set noreorder # __raw_write_lock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | "1: ll %1, %2 \n" |
| 225 | " bnez %1, 1b \n" |
| 226 | " lui %1, 0x8000 \n" |
| 227 | " sc %1, %0 \n" |
| 228 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 229 | " nop \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | " .set reorder \n" |
| 231 | : "=m" (rw->lock), "=&r" (tmp) |
| 232 | : "m" (rw->lock) |
| 233 | : "memory"); |
| 234 | } |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 235 | |
| 236 | smp_mb(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | } |
| 238 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 239 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 240 | { |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 241 | smp_mb(); |
| 242 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | __asm__ __volatile__( |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 244 | " # __raw_write_unlock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | " sw $0, %0 \n" |
| 246 | : "=m" (rw->lock) |
| 247 | : "m" (rw->lock) |
| 248 | : "memory"); |
| 249 | } |
| 250 | |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 251 | static inline int __raw_read_trylock(raw_rwlock_t *rw) |
| 252 | { |
| 253 | unsigned int tmp; |
| 254 | int ret; |
| 255 | |
| 256 | if (R10000_LLSC_WAR) { |
| 257 | __asm__ __volatile__( |
| 258 | " .set noreorder # __raw_read_trylock \n" |
| 259 | " li %2, 0 \n" |
| 260 | "1: ll %1, %3 \n" |
| 261 | " bnez %1, 2f \n" |
| 262 | " addu %1, 1 \n" |
| 263 | " sc %1, %0 \n" |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 264 | " .set reorder \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 265 | " beqzl %1, 1b \n" |
| 266 | " nop \n" |
| 267 | __WEAK_ORDERING_MB |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 268 | " li %2, 1 \n" |
| 269 | "2: \n" |
| 270 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
| 271 | : "m" (rw->lock) |
| 272 | : "memory"); |
| 273 | } else { |
| 274 | __asm__ __volatile__( |
| 275 | " .set noreorder # __raw_read_trylock \n" |
| 276 | " li %2, 0 \n" |
| 277 | "1: ll %1, %3 \n" |
| 278 | " bnez %1, 2f \n" |
| 279 | " addu %1, 1 \n" |
| 280 | " sc %1, %0 \n" |
| 281 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 282 | " nop \n" |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 283 | " .set reorder \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 284 | __WEAK_ORDERING_MB |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 285 | " li %2, 1 \n" |
| 286 | "2: \n" |
| 287 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
| 288 | : "m" (rw->lock) |
| 289 | : "memory"); |
| 290 | } |
| 291 | |
| 292 | return ret; |
| 293 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 295 | static inline int __raw_write_trylock(raw_rwlock_t *rw) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | { |
| 297 | unsigned int tmp; |
| 298 | int ret; |
| 299 | |
| 300 | if (R10000_LLSC_WAR) { |
| 301 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 302 | " .set noreorder # __raw_write_trylock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | " li %2, 0 \n" |
| 304 | "1: ll %1, %3 \n" |
| 305 | " bnez %1, 2f \n" |
| 306 | " lui %1, 0x8000 \n" |
| 307 | " sc %1, %0 \n" |
| 308 | " beqzl %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 309 | " nop \n" |
| 310 | __WEAK_ORDERING_MB |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | " li %2, 1 \n" |
| 312 | " .set reorder \n" |
| 313 | "2: \n" |
| 314 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
| 315 | : "m" (rw->lock) |
| 316 | : "memory"); |
| 317 | } else { |
| 318 | __asm__ __volatile__( |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 319 | " .set noreorder # __raw_write_trylock \n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | " li %2, 0 \n" |
| 321 | "1: ll %1, %3 \n" |
| 322 | " bnez %1, 2f \n" |
| 323 | " lui %1, 0x8000 \n" |
| 324 | " sc %1, %0 \n" |
| 325 | " beqz %1, 1b \n" |
Ralf Baechle | 0004a9d | 2006-10-31 03:45:07 +0000 | [diff] [blame] | 326 | " nop \n" |
| 327 | __WEAK_ORDERING_MB |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 328 | " li %2, 1 \n" |
| 329 | " .set reorder \n" |
| 330 | "2: \n" |
| 331 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
| 332 | : "m" (rw->lock) |
| 333 | : "memory"); |
| 334 | } |
| 335 | |
| 336 | return ret; |
| 337 | } |
| 338 | |
Ralf Baechle | 65316fd | 2006-08-31 14:16:06 +0100 | [diff] [blame] | 339 | |
Martin Schwidefsky | ef6edc9 | 2006-09-30 23:27:43 -0700 | [diff] [blame] | 340 | #define _raw_spin_relax(lock) cpu_relax() |
| 341 | #define _raw_read_relax(lock) cpu_relax() |
| 342 | #define _raw_write_relax(lock) cpu_relax() |
| 343 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | #endif /* _ASM_SPINLOCK_H */ |