diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:35:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:37:32 -0400 |
commit | 365d46dc9be9b3c833990a06f3994b1987eda578 (patch) | |
tree | 9397d1304144a288411f2118707f44ff5e862fa6 /include/asm-x86/spinlock.h | |
parent | 5dc64a3442b98eaa0e3730c35fcf00cf962a93e7 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/xen
Conflicts:
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_64.c
arch/x86/xen/enlighten.c
Diffstat (limited to 'include/asm-x86/spinlock.h')
-rw-r--r-- | include/asm-x86/spinlock.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h index b755ea86367e..8badab09146b 100644 --- a/include/asm-x86/spinlock.h +++ b/include/asm-x86/spinlock.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_SPINLOCK_H_ | 1 | #ifndef ASM_X86__SPINLOCK_H |
2 | #define _X86_SPINLOCK_H_ | 2 | #define ASM_X86__SPINLOCK_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | #include <asm/rwlock.h> | 5 | #include <asm/rwlock.h> |
@@ -97,7 +97,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) | |||
97 | "jne 1f\n\t" | 97 | "jne 1f\n\t" |
98 | "movw %w0,%w1\n\t" | 98 | "movw %w0,%w1\n\t" |
99 | "incb %h1\n\t" | 99 | "incb %h1\n\t" |
100 | "lock ; cmpxchgw %w1,%2\n\t" | 100 | LOCK_PREFIX "cmpxchgw %w1,%2\n\t" |
101 | "1:" | 101 | "1:" |
102 | "sete %b1\n\t" | 102 | "sete %b1\n\t" |
103 | "movzbl %b1,%0\n\t" | 103 | "movzbl %b1,%0\n\t" |
@@ -135,7 +135,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | |||
135 | int inc = 0x00010000; | 135 | int inc = 0x00010000; |
136 | int tmp; | 136 | int tmp; |
137 | 137 | ||
138 | asm volatile("lock ; xaddl %0, %1\n" | 138 | asm volatile(LOCK_PREFIX "xaddl %0, %1\n" |
139 | "movzwl %w0, %2\n\t" | 139 | "movzwl %w0, %2\n\t" |
140 | "shrl $16, %0\n\t" | 140 | "shrl $16, %0\n\t" |
141 | "1:\t" | 141 | "1:\t" |
@@ -162,7 +162,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) | |||
162 | "cmpl %0,%1\n\t" | 162 | "cmpl %0,%1\n\t" |
163 | "jne 1f\n\t" | 163 | "jne 1f\n\t" |
164 | "addl $0x00010000, %1\n\t" | 164 | "addl $0x00010000, %1\n\t" |
165 | "lock ; cmpxchgl %1,%2\n\t" | 165 | LOCK_PREFIX "cmpxchgl %1,%2\n\t" |
166 | "1:" | 166 | "1:" |
167 | "sete %b1\n\t" | 167 | "sete %b1\n\t" |
168 | "movzbl %b1,%0\n\t" | 168 | "movzbl %b1,%0\n\t" |
@@ -371,4 +371,4 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
371 | #define _raw_read_relax(lock) cpu_relax() | 371 | #define _raw_read_relax(lock) cpu_relax() |
372 | #define _raw_write_relax(lock) cpu_relax() | 372 | #define _raw_write_relax(lock) cpu_relax() |
373 | 373 | ||
374 | #endif | 374 | #endif /* ASM_X86__SPINLOCK_H */ |