summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-05-07 10:51:38 +0200
committerIngo Molnar <mingo@elte.hu>2011-05-07 10:51:48 +0200
commit4cb1f43ce8c72ee453c00fcb9f6ee9c4ebd03f98 (patch)
tree15e64f192b54ea01fd640d69eed0cabed2baaaa9 /arch/x86/lib
parent9de4966a4d218f29c68e96e8e7b4d2840dedec79 (diff)
parent0ee5623f9a6e52df90a78bd21179f8ab370e102e (diff)
Merge commit 'v2.6.39-rc6' into x86/cleanups
Merge reason: move to a (much) newer upstream base. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/cmpxchg16b_emu.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86/lib/cmpxchg16b_emu.S b/arch/x86/lib/cmpxchg16b_emu.S
index 3e8b08a6de2..1e572c507d0 100644
--- a/arch/x86/lib/cmpxchg16b_emu.S
+++ b/arch/x86/lib/cmpxchg16b_emu.S
@@ -10,6 +10,12 @@
#include <asm/frame.h>
#include <asm/dwarf2.h>
+#ifdef CONFIG_SMP
+#define SEG_PREFIX %gs:
+#else
+#define SEG_PREFIX
+#endif
+
.text
/*
@@ -37,13 +43,13 @@ this_cpu_cmpxchg16b_emu:
pushf
cli
- cmpq %gs:(%rsi), %rax
+ cmpq SEG_PREFIX(%rsi), %rax
jne not_same
- cmpq %gs:8(%rsi), %rdx
+ cmpq SEG_PREFIX 8(%rsi), %rdx
jne not_same
- movq %rbx, %gs:(%rsi)
- movq %rcx, %gs:8(%rsi)
+ movq %rbx, SEG_PREFIX(%rsi)
+ movq %rcx, SEG_PREFIX 8(%rsi)
popf
mov $1, %al