diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-04 10:47:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-04 10:47:58 -0500 |
commit | 2532ec6d178abc55681d049097d3dc577eaa266c (patch) | |
tree | 8e0b356fc49afe63ccc29ea261d8b29ec771d8bf /include/asm-x86 | |
parent | f832ff18e886ada0ff30a1edeab082ce218d107e (diff) |
x86: use _ASM_EXTABLE macro in include/asm-x86/futex.h
Use the _ASM_EXTABLE macro from <asm/asm.h>, instead of open-coding
__ex_table entires in include/asm-x86/futex.h.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/futex.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h index 9d919264923a..cd9f894dd2d7 100644 --- a/include/asm-x86/futex.h +++ b/include/asm-x86/futex.h | |||
@@ -17,11 +17,8 @@ | |||
17 | "2: .section .fixup,\"ax\"\n \ | 17 | "2: .section .fixup,\"ax\"\n \ |
18 | 3: mov %3, %1\n \ | 18 | 3: mov %3, %1\n \ |
19 | jmp 2b\n \ | 19 | jmp 2b\n \ |
20 | .previous\n \ | 20 | .previous\n" \ |
21 | .section __ex_table,\"a\"\n \ | 21 | _ASM_EXTABLE(1b,3b) \ |
22 | .align 8\n" \ | ||
23 | _ASM_PTR "1b,3b\n \ | ||
24 | .previous" \ | ||
25 | : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ | 22 | : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ |
26 | : "i" (-EFAULT), "0" (oparg), "1" (0)) | 23 | : "i" (-EFAULT), "0" (oparg), "1" (0)) |
27 | 24 | ||
@@ -35,11 +32,9 @@ | |||
35 | 3: .section .fixup,\"ax\"\n \ | 32 | 3: .section .fixup,\"ax\"\n \ |
36 | 4: mov %5, %1\n \ | 33 | 4: mov %5, %1\n \ |
37 | jmp 3b\n \ | 34 | jmp 3b\n \ |
38 | .previous\n \ | 35 | .previous\n" \ |
39 | .section __ex_table,\"a\"\n \ | 36 | _ASM_EXTABLE(1b,4b) \ |
40 | .align 8\n" \ | 37 | _ASM_EXTABLE(2b,4b) \ |
41 | _ASM_PTR "1b,4b,2b,4b\n \ | ||
42 | .previous" \ | ||
43 | : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ | 38 | : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ |
44 | "=&r" (tem) \ | 39 | "=&r" (tem) \ |
45 | : "r" (oparg), "i" (-EFAULT), "1" (0)) | 40 | : "r" (oparg), "i" (-EFAULT), "1" (0)) |
@@ -111,18 +106,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
111 | return -EFAULT; | 106 | return -EFAULT; |
112 | 107 | ||
113 | __asm__ __volatile__( | 108 | __asm__ __volatile__( |
114 | |||
115 | "1: lock; cmpxchgl %3, %1 \n" | 109 | "1: lock; cmpxchgl %3, %1 \n" |
116 | "2: .section .fixup, \"ax\" \n" | 110 | "2: .section .fixup, \"ax\" \n" |
117 | "3: mov %2, %0 \n" | 111 | "3: mov %2, %0 \n" |
118 | " jmp 2b \n" | 112 | " jmp 2b \n" |
119 | " .previous \n" | 113 | " .previous \n" |
120 | 114 | _ASM_EXTABLE(1b,3b) | |
121 | " .section __ex_table, \"a\" \n" | ||
122 | " .align 8 \n" | ||
123 | _ASM_PTR " 1b,3b \n" | ||
124 | " .previous \n" | ||
125 | |||
126 | : "=a" (oldval), "+m" (*uaddr) | 115 | : "=a" (oldval), "+m" (*uaddr) |
127 | : "i" (-EFAULT), "r" (newval), "0" (oldval) | 116 | : "i" (-EFAULT), "r" (newval), "0" (oldval) |
128 | : "memory" | 117 | : "memory" |