diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 11:08:42 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 11:08:42 -0400 |
commit | 7203781c98ad9147564d327de6f6513ad8fc0f4e (patch) | |
tree | 5c29a2a04a626bf08a0d56fd8a0068b3c92ad284 /include/asm-x86/spinlock.h | |
parent | 671eef85a3e885dff4ce210d8774ad50a91d5967 (diff) | |
parent | af2e1f276ff08f17192411ea3b71c13a758dfe12 (diff) |
Merge branch 'x86/cpu' into x86/core
Conflicts:
arch/x86/kernel/cpu/feature_names.c
include/asm-x86/cpufeature.h
Diffstat (limited to 'include/asm-x86/spinlock.h')
-rw-r--r-- | include/asm-x86/spinlock.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h index cbe01086ba64..5d08fa280fdf 100644 --- a/include/asm-x86/spinlock.h +++ b/include/asm-x86/spinlock.h | |||
@@ -65,7 +65,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) | |||
65 | { | 65 | { |
66 | int tmp = ACCESS_ONCE(lock->slock); | 66 | int tmp = ACCESS_ONCE(lock->slock); |
67 | 67 | ||
68 | return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; | 68 | return (((tmp >> 8) - tmp) & 0xff) > 1; |
69 | } | 69 | } |
70 | 70 | ||
71 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | 71 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) |
@@ -127,7 +127,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) | |||
127 | { | 127 | { |
128 | int tmp = ACCESS_ONCE(lock->slock); | 128 | int tmp = ACCESS_ONCE(lock->slock); |
129 | 129 | ||
130 | return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1; | 130 | return (((tmp >> 16) - tmp) & 0xffff) > 1; |
131 | } | 131 | } |
132 | 132 | ||
133 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | 133 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) |