Skip to content

Commit

Permalink
x86: ticket spin locks: fix asm constraints
Browse files Browse the repository at this point in the history
In addition to these changes I doubt the 'volatile' on all the ticket
lock asm()-s are really necessary.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Sep 5, 2008
1 parent 0a328ea commit ef1f341
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/asm-x86/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
"1:"
"sete %b1\n\t"
"movzbl %b1,%0\n\t"
: "=&a" (tmp), "=Q" (new), "+m" (lock->slock)
: "=&a" (tmp), "=&Q" (new), "+m" (lock->slock)
:
: "memory", "cc");

Expand Down Expand Up @@ -146,7 +146,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
/* don't need lfence here, because loads are in-order */
"jmp 1b\n"
"2:"
: "+Q" (inc), "+m" (lock->slock), "=r" (tmp)
: "+r" (inc), "+m" (lock->slock), "=&r" (tmp)
:
: "memory", "cc");
}
Expand All @@ -166,7 +166,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
"1:"
"sete %b1\n\t"
"movzbl %b1,%0\n\t"
: "=&a" (tmp), "=r" (new), "+m" (lock->slock)
: "=&a" (tmp), "=&q" (new), "+m" (lock->slock)
:
: "memory", "cc");

Expand Down

0 comments on commit ef1f341

Please sign in to comment.