diff options
author | Jan Beulich <JBeulich@suse.com> | 2014-09-24 03:40:14 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-10-08 04:05:49 -0400 |
commit | 5f1d919a8ca15f450c749227bc5e2e18f3cbfdb4 (patch) | |
tree | 00c028d32d6c9f97740271ee5645607ce6ae7b6d | |
parent | 3f63572187f5ae6a0a9e5ebee88b57e6f71c3cd4 (diff) |
x86: Improve cmpxchg8b_emu.S
- don't include unneeded headers
- drop redundant entry point label
- complete unwind annotations
- use .L prefix on local labels to not clutter the symbol table
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/5422917E0200007800038081@mail.emea.novell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/lib/cmpxchg8b_emu.S | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/x86/lib/cmpxchg8b_emu.S b/arch/x86/lib/cmpxchg8b_emu.S index 828cb710dec2..b4807fce5177 100644 --- a/arch/x86/lib/cmpxchg8b_emu.S +++ b/arch/x86/lib/cmpxchg8b_emu.S | |||
@@ -7,11 +7,8 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <asm/alternative-asm.h> | ||
11 | #include <asm/frame.h> | ||
12 | #include <asm/dwarf2.h> | 10 | #include <asm/dwarf2.h> |
13 | 11 | ||
14 | |||
15 | .text | 12 | .text |
16 | 13 | ||
17 | /* | 14 | /* |
@@ -30,27 +27,28 @@ CFI_STARTPROC | |||
30 | # set the whole ZF thing (caller will just compare | 27 | # set the whole ZF thing (caller will just compare |
31 | # eax:edx with the expected value) | 28 | # eax:edx with the expected value) |
32 | # | 29 | # |
33 | cmpxchg8b_emu: | 30 | pushfl_cfi |
34 | pushfl | ||
35 | cli | 31 | cli |
36 | 32 | ||
37 | cmpl (%esi), %eax | 33 | cmpl (%esi), %eax |
38 | jne not_same | 34 | jne .Lnot_same |
39 | cmpl 4(%esi), %edx | 35 | cmpl 4(%esi), %edx |
40 | jne half_same | 36 | jne .Lhalf_same |
41 | 37 | ||
42 | movl %ebx, (%esi) | 38 | movl %ebx, (%esi) |
43 | movl %ecx, 4(%esi) | 39 | movl %ecx, 4(%esi) |
44 | 40 | ||
45 | popfl | 41 | CFI_REMEMBER_STATE |
42 | popfl_cfi | ||
46 | ret | 43 | ret |
47 | 44 | ||
48 | not_same: | 45 | CFI_RESTORE_STATE |
46 | .Lnot_same: | ||
49 | movl (%esi), %eax | 47 | movl (%esi), %eax |
50 | half_same: | 48 | .Lhalf_same: |
51 | movl 4(%esi), %edx | 49 | movl 4(%esi), %edx |
52 | 50 | ||
53 | popfl | 51 | popfl_cfi |
54 | ret | 52 | ret |
55 | 53 | ||
56 | CFI_ENDPROC | 54 | CFI_ENDPROC |