diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 10:31:36 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 10:31:36 -0400 |
commit | 31e77ac55f18db0ec1c724840927562ef3093ef6 (patch) | |
tree | 01bb0ac2868debd2246df4c5e5617a2ce9f09600 /include/asm-x86_64/spinlock.h | |
parent | 5029996547a9f3988459e11955c13259495308ef (diff) | |
parent | c336923b668fdcf0312efbec3b44895d713f4d81 (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'include/asm-x86_64/spinlock.h')
-rw-r--r-- | include/asm-x86_64/spinlock.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h index 8d3421996f94..248a79f0eaff 100644 --- a/include/asm-x86_64/spinlock.h +++ b/include/asm-x86_64/spinlock.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #define __raw_spin_lock_string \ | 22 | #define __raw_spin_lock_string \ |
23 | "\n1:\t" \ | 23 | "\n1:\t" \ |
24 | "lock ; decl %0\n\t" \ | 24 | LOCK_PREFIX " ; decl %0\n\t" \ |
25 | "js 2f\n" \ | 25 | "js 2f\n" \ |
26 | LOCK_SECTION_START("") \ | 26 | LOCK_SECTION_START("") \ |
27 | "2:\t" \ | 27 | "2:\t" \ |
@@ -40,10 +40,7 @@ | |||
40 | 40 | ||
41 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 41 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
42 | { | 42 | { |
43 | alternative_smp( | 43 | asm volatile(__raw_spin_lock_string : "=m" (lock->slock) : : "memory"); |
44 | __raw_spin_lock_string, | ||
45 | __raw_spin_lock_string_up, | ||
46 | "=m" (lock->slock) : : "memory"); | ||
47 | } | 44 | } |
48 | 45 | ||
49 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | 46 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) |
@@ -125,12 +122,12 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock) | |||
125 | 122 | ||
126 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 123 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
127 | { | 124 | { |
128 | asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory"); | 125 | asm volatile(LOCK_PREFIX " ; incl %0" :"=m" (rw->lock) : : "memory"); |
129 | } | 126 | } |
130 | 127 | ||
131 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 128 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
132 | { | 129 | { |
133 | asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0" | 130 | asm volatile(LOCK_PREFIX " ; addl $" RW_LOCK_BIAS_STR ",%0" |
134 | : "=m" (rw->lock) : : "memory"); | 131 | : "=m" (rw->lock) : : "memory"); |
135 | } | 132 | } |
136 | 133 | ||