summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/spinlock.h
diff options
context:
space:
mode:
authorH. Peter Anvin2008-09-04 17:08:42 +0200
committerH. Peter Anvin2008-09-04 17:08:42 +0200
commit7203781c98ad9147564d327de6f6513ad8fc0f4e (patch)
tree5c29a2a04a626bf08a0d56fd8a0068b3c92ad284 /include/asm-x86/spinlock.h
parentx86, e820: add support for AddressRangeUnusuable ACPI memory type (diff)
parentx86: cpufeature: fix SMX flag (diff)
downloadkernel-qcow2-linux-7203781c98ad9147564d327de6f6513ad8fc0f4e.tar.gz
kernel-qcow2-linux-7203781c98ad9147564d327de6f6513ad8fc0f4e.tar.xz
kernel-qcow2-linux-7203781c98ad9147564d327de6f6513ad8fc0f4e.zip
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.h4
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)
{
int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1;
+ return (((tmp >> 8) - tmp) & 0xff) > 1;
}
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)
{
int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1;
+ return (((tmp >> 16) - tmp) & 0xffff) > 1;
}
static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)