aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:30:34 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:34 -0500
commit3b23ed84ec34f04f54f7d5b1e35f258d64a7a5fb (patch)
treeb78e155e003dd854b9947eb06f9f79c32df8d4f7 /include
parent6514f93a2ce643ef5914eae7ce49b978e1d356aa (diff)
x86: spinlock_32/64 match the jump labels and symbols
Match the jump labels in the 32/64 variants and switch the 64bit version to symbols, so the functions are almost identical except for the operand size now. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/spinlock_32.h1
-rw-r--r--include/asm-x86/spinlock_64.h21
2 files changed, 11 insertions, 11 deletions
diff --git a/include/asm-x86/spinlock_32.h b/include/asm-x86/spinlock_32.h
index e7a14ab906e9..4ef626d53682 100644
--- a/include/asm-x86/spinlock_32.h
+++ b/include/asm-x86/spinlock_32.h
@@ -53,7 +53,6 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock,
53 "\n1:\t" 53 "\n1:\t"
54 LOCK_PREFIX " ; decb %[slock]\n\t" 54 LOCK_PREFIX " ; decb %[slock]\n\t"
55 "jns 5f\n" 55 "jns 5f\n"
56 "2:\t"
57 "testl $0x200, %[flags]\n\t" 56 "testl $0x200, %[flags]\n\t"
58 "jz 4f\n\t" 57 "jz 4f\n\t"
59 STI_STRING "\n" 58 STI_STRING "\n"
diff --git a/include/asm-x86/spinlock_64.h b/include/asm-x86/spinlock_64.h
index ab50e7f51058..19d483c80185 100644
--- a/include/asm-x86/spinlock_64.h
+++ b/include/asm-x86/spinlock_64.h
@@ -27,13 +27,13 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
27 asm volatile( 27 asm volatile(
28 "\n1:\t" 28 "\n1:\t"
29 LOCK_PREFIX " ; decl %0\n\t" 29 LOCK_PREFIX " ; decl %0\n\t"
30 "jns 2f\n" 30 "jns 3f\n"
31 "3:\n" 31 "2:\t"
32 "rep;nop\n\t" 32 "rep;nop\n\t"
33 "cmpl $0,%0\n\t" 33 "cmpl $0,%0\n\t"
34 "jle 3b\n\t" 34 "jle 2b\n\t"
35 "jmp 1b\n" 35 "jmp 1b\n"
36 "2:\t" 36 "3:\n\t"
37 : "+m" (lock->slock) : : "memory"); 37 : "+m" (lock->slock) : : "memory");
38} 38}
39 39
@@ -51,25 +51,26 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock,
51{ 51{
52 asm volatile( 52 asm volatile(
53 "\n1:\t" 53 "\n1:\t"
54 LOCK_PREFIX " ; decl %0\n\t" 54 LOCK_PREFIX " ; decl %[slock]\n\t"
55 "jns 5f\n" 55 "jns 5f\n"
56 "testl $0x200, %1\n\t" /* interrupts were disabled? */ 56 "testl $0x200, %[flags]\n\t"
57 "jz 4f\n\t" 57 "jz 4f\n\t"
58 STI_STRING "\n" 58 STI_STRING "\n"
59 "3:\t" 59 "3:\t"
60 "rep;nop\n\t" 60 "rep;nop\n\t"
61 "cmpl $0, %0\n\t" 61 "cmpl $0, %[slock]\n\t"
62 "jle 3b\n\t" 62 "jle 3b\n\t"
63 CLI_STRING "\n\t" 63 CLI_STRING "\n\t"
64 "jmp 1b\n" 64 "jmp 1b\n"
65 "4:\t" 65 "4:\t"
66 "rep;nop\n\t" 66 "rep;nop\n\t"
67 "cmpl $0, %0\n\t" 67 "cmpl $0, %[slock]\n\t"
68 "jg 1b\n\t" 68 "jg 1b\n\t"
69 "jmp 4b\n" 69 "jmp 4b\n"
70 "5:\n\t" 70 "5:\n\t"
71 : "+m" (lock->slock) 71 : [slock] "+m" (lock->slock)
72 : "r" ((unsigned)flags) CLI_STI_INPUT_ARGS 72 : [flags] "r" ((unsigned)flags)
73 CLI_STI_INPUT_ARGS
73 : "memory" CLI_STI_CLOBBERS); 74 : "memory" CLI_STI_CLOBBERS);
74} 75}
75#endif 76#endif