diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:32 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:32 -0400 |
commit | 8578bdf835d6d6ece6718858d351456367b8a5cf (patch) | |
tree | 5bf4aa72bda1f5c508d955a2d32b5d292f8bd5a7 /include/asm-x86_64/mutex.h | |
parent | 7ca2b49b06a6d26e89e3535653889f1d7892b085 (diff) |
[PATCH] Don't use lock section for mutexes and semaphores
Lock sections cannot be handled by the dwarf2 unwinder.
Disadvantage is a taken branch in the hot path.
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-x86_64/mutex.h')
-rw-r--r-- | include/asm-x86_64/mutex.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/include/asm-x86_64/mutex.h b/include/asm-x86_64/mutex.h index 06fab6de2a88..16396b1de3e4 100644 --- a/include/asm-x86_64/mutex.h +++ b/include/asm-x86_64/mutex.h | |||
@@ -25,13 +25,9 @@ do { \ | |||
25 | \ | 25 | \ |
26 | __asm__ __volatile__( \ | 26 | __asm__ __volatile__( \ |
27 | LOCK_PREFIX " decl (%%rdi) \n" \ | 27 | LOCK_PREFIX " decl (%%rdi) \n" \ |
28 | " js 2f \n" \ | 28 | " jns 1f \n" \ |
29 | "1: \n" \ | 29 | " call "#fail_fn" \n" \ |
30 | \ | 30 | "1:" \ |
31 | LOCK_SECTION_START("") \ | ||
32 | "2: call "#fail_fn" \n" \ | ||
33 | " jmp 1b \n" \ | ||
34 | LOCK_SECTION_END \ | ||
35 | \ | 31 | \ |
36 | :"=D" (dummy) \ | 32 | :"=D" (dummy) \ |
37 | : "D" (v) \ | 33 | : "D" (v) \ |
@@ -75,13 +71,9 @@ do { \ | |||
75 | \ | 71 | \ |
76 | __asm__ __volatile__( \ | 72 | __asm__ __volatile__( \ |
77 | LOCK_PREFIX " incl (%%rdi) \n" \ | 73 | LOCK_PREFIX " incl (%%rdi) \n" \ |
78 | " jle 2f \n" \ | 74 | " jg 1f \n" \ |
79 | "1: \n" \ | 75 | " call "#fail_fn" \n" \ |
80 | \ | 76 | "1: " \ |
81 | LOCK_SECTION_START("") \ | ||
82 | "2: call "#fail_fn" \n" \ | ||
83 | " jmp 1b \n" \ | ||
84 | LOCK_SECTION_END \ | ||
85 | \ | 77 | \ |
86 | :"=D" (dummy) \ | 78 | :"=D" (dummy) \ |
87 | : "D" (v) \ | 79 | : "D" (v) \ |