diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2011-03-25 13:45:13 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-03-25 13:45:13 -0400 |
commit | 756cca61a7faddcafa582d683b46f32280eda948 (patch) | |
tree | 84901288d159ddbf8d43fda16b078e54262e0549 /arch/mips/include | |
parent | 4bafad922ab480d5f86052e679abf5c3ca6dbfa7 (diff) |
MIPS: Microoptimize arch_{read,write}_lock
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/spinlock.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h index 396e402fbe2c..ca61e846ab0f 100644 --- a/arch/mips/include/asm/spinlock.h +++ b/arch/mips/include/asm/spinlock.h | |||
@@ -245,16 +245,16 @@ static inline void arch_read_lock(arch_rwlock_t *rw) | |||
245 | __asm__ __volatile__( | 245 | __asm__ __volatile__( |
246 | " .set noreorder # arch_read_lock \n" | 246 | " .set noreorder # arch_read_lock \n" |
247 | "1: ll %1, %2 \n" | 247 | "1: ll %1, %2 \n" |
248 | " bltz %1, 2f \n" | 248 | " bltz %1, 3f \n" |
249 | " addu %1, 1 \n" | 249 | " addu %1, 1 \n" |
250 | " sc %1, %0 \n" | 250 | "2: sc %1, %0 \n" |
251 | " beqz %1, 1b \n" | 251 | " beqz %1, 1b \n" |
252 | " nop \n" | 252 | " nop \n" |
253 | " .subsection 2 \n" | 253 | " .subsection 2 \n" |
254 | "2: ll %1, %2 \n" | 254 | "3: ll %1, %2 \n" |
255 | " bltz %1, 2b \n" | 255 | " bltz %1, 3b \n" |
256 | " addu %1, 1 \n" | 256 | " addu %1, 1 \n" |
257 | " b 1b \n" | 257 | " b 2b \n" |
258 | " nop \n" | 258 | " nop \n" |
259 | " .previous \n" | 259 | " .previous \n" |
260 | " .set reorder \n" | 260 | " .set reorder \n" |
@@ -324,16 +324,16 @@ static inline void arch_write_lock(arch_rwlock_t *rw) | |||
324 | __asm__ __volatile__( | 324 | __asm__ __volatile__( |
325 | " .set noreorder # arch_write_lock \n" | 325 | " .set noreorder # arch_write_lock \n" |
326 | "1: ll %1, %2 \n" | 326 | "1: ll %1, %2 \n" |
327 | " bnez %1, 2f \n" | 327 | " bnez %1, 3f \n" |
328 | " lui %1, 0x8000 \n" | 328 | " lui %1, 0x8000 \n" |
329 | " sc %1, %0 \n" | 329 | "2: sc %1, %0 \n" |
330 | " beqz %1, 2f \n" | 330 | " beqz %1, 3f \n" |
331 | " nop \n" | 331 | " nop \n" |
332 | " .subsection 2 \n" | 332 | " .subsection 2 \n" |
333 | "2: ll %1, %2 \n" | 333 | "3: ll %1, %2 \n" |
334 | " bnez %1, 2b \n" | 334 | " bnez %1, 3b \n" |
335 | " lui %1, 0x8000 \n" | 335 | " lui %1, 0x8000 \n" |
336 | " b 1b \n" | 336 | " b 2b \n" |
337 | " nop \n" | 337 | " nop \n" |
338 | " .previous \n" | 338 | " .previous \n" |
339 | " .set reorder \n" | 339 | " .set reorder \n" |