diff options
-rw-r--r-- | include/asm-i386/spinlock.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index a1b8a8a30e21..d76b7693cf1d 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h | |||
@@ -35,18 +35,23 @@ | |||
35 | #define __raw_spin_lock_string_flags \ | 35 | #define __raw_spin_lock_string_flags \ |
36 | "\n1:\t" \ | 36 | "\n1:\t" \ |
37 | "lock ; decb %0\n\t" \ | 37 | "lock ; decb %0\n\t" \ |
38 | "jns 4f\n\t" \ | 38 | "jns 5f\n" \ |
39 | "2:\t" \ | 39 | "2:\t" \ |
40 | "testl $0x200, %1\n\t" \ | 40 | "testl $0x200, %1\n\t" \ |
41 | "jz 3f\n\t" \ | 41 | "jz 4f\n\t" \ |
42 | "sti\n\t" \ | 42 | "sti\n" \ |
43 | "3:\t" \ | 43 | "3:\t" \ |
44 | "rep;nop\n\t" \ | 44 | "rep;nop\n\t" \ |
45 | "cmpb $0, %0\n\t" \ | 45 | "cmpb $0, %0\n\t" \ |
46 | "jle 3b\n\t" \ | 46 | "jle 3b\n\t" \ |
47 | "cli\n\t" \ | 47 | "cli\n\t" \ |
48 | "jmp 1b\n" \ | 48 | "jmp 1b\n" \ |
49 | "4:\n\t" | 49 | "4:\t" \ |
50 | "rep;nop\n\t" \ | ||
51 | "cmpb $0, %0\n\t" \ | ||
52 | "jg 1b\n\t" \ | ||
53 | "jmp 4b\n" \ | ||
54 | "5:\n\t" | ||
50 | 55 | ||
51 | #define __raw_spin_lock_string_up \ | 56 | #define __raw_spin_lock_string_up \ |
52 | "\n\tdecb %0" | 57 | "\n\tdecb %0" |