diff options
Diffstat (limited to 'include/asm-x86_64/rwlock.h')
-rw-r--r-- | include/asm-x86_64/rwlock.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/include/asm-x86_64/rwlock.h b/include/asm-x86_64/rwlock.h index 28a080d23119..72aeebed920b 100644 --- a/include/asm-x86_64/rwlock.h +++ b/include/asm-x86_64/rwlock.h | |||
@@ -21,18 +21,6 @@ | |||
21 | #define RW_LOCK_BIAS 0x01000000 | 21 | #define RW_LOCK_BIAS 0x01000000 |
22 | #define RW_LOCK_BIAS_STR "0x01000000" | 22 | #define RW_LOCK_BIAS_STR "0x01000000" |
23 | 23 | ||
24 | #define __build_read_lock(rw) \ | 24 | /* Actual code is in asm/spinlock.h or in arch/x86_64/lib/rwlock.S */ |
25 | asm volatile(LOCK_PREFIX "subl $1,(%0)\n\t" \ | ||
26 | "jns 1f\n" \ | ||
27 | "call __read_lock_failed\n" \ | ||
28 | "1:\n" \ | ||
29 | ::"D" (rw), "i" (RW_LOCK_BIAS) : "memory") | ||
30 | |||
31 | #define __build_write_lock(rw) \ | ||
32 | asm volatile(LOCK_PREFIX "subl %1,(%0)\n\t" \ | ||
33 | "jz 1f\n" \ | ||
34 | "\tcall __write_lock_failed\n\t" \ | ||
35 | "1:\n" \ | ||
36 | ::"D" (rw), "i" (RW_LOCK_BIAS) : "memory") | ||
37 | 25 | ||
38 | #endif | 26 | #endif |