Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79802
b: refs/heads/master
c: 3b23ed8
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent c437d36 commit 5c63f7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6514f93a2ce643ef5914eae7ce49b978e1d356aa
refs/heads/master: 3b23ed84ec34f04f54f7d5b1e35f258d64a7a5fb
1 change: 0 additions & 1 deletion trunk/include/asm-x86/spinlock_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock,
"\n1:\t"
LOCK_PREFIX " ; decb %[slock]\n\t"
"jns 5f\n"
"2:\t"
"testl $0x200, %[flags]\n\t"
"jz 4f\n\t"
STI_STRING "\n"
Expand Down
21 changes: 11 additions & 10 deletions trunk/include/asm-x86/spinlock_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
asm volatile(
"\n1:\t"
LOCK_PREFIX " ; decl %0\n\t"
"jns 2f\n"
"3:\n"
"jns 3f\n"
"2:\t"
"rep;nop\n\t"
"cmpl $0,%0\n\t"
"jle 3b\n\t"
"jle 2b\n\t"
"jmp 1b\n"
"2:\t"
"3:\n\t"
: "+m" (lock->slock) : : "memory");
}

Expand All @@ -51,25 +51,26 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock,
{
asm volatile(
"\n1:\t"
LOCK_PREFIX " ; decl %0\n\t"
LOCK_PREFIX " ; decl %[slock]\n\t"
"jns 5f\n"
"testl $0x200, %1\n\t" /* interrupts were disabled? */
"testl $0x200, %[flags]\n\t"
"jz 4f\n\t"
STI_STRING "\n"
"3:\t"
"rep;nop\n\t"
"cmpl $0, %0\n\t"
"cmpl $0, %[slock]\n\t"
"jle 3b\n\t"
CLI_STRING "\n\t"
"jmp 1b\n"
"4:\t"
"rep;nop\n\t"
"cmpl $0, %0\n\t"
"cmpl $0, %[slock]\n\t"
"jg 1b\n\t"
"jmp 4b\n"
"5:\n\t"
: "+m" (lock->slock)
: "r" ((unsigned)flags) CLI_STI_INPUT_ARGS
: [slock] "+m" (lock->slock)
: [flags] "r" ((unsigned)flags)
CLI_STI_INPUT_ARGS
: "memory" CLI_STI_CLOBBERS);
}
#endif
Expand Down

0 comments on commit 5c63f7a

Please sign in to comment.