Commit 2532ec6d authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Ingo Molnar

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: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent f832ff18
...@@ -17,11 +17,8 @@ ...@@ -17,11 +17,8 @@
"2: .section .fixup,\"ax\"\n \ "2: .section .fixup,\"ax\"\n \
3: mov %3, %1\n \ 3: mov %3, %1\n \
jmp 2b\n \ jmp 2b\n \
.previous\n \ .previous\n" \
.section __ex_table,\"a\"\n \ _ASM_EXTABLE(1b,3b) \
.align 8\n" \
_ASM_PTR "1b,3b\n \
.previous" \
: "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
: "i" (-EFAULT), "0" (oparg), "1" (0)) : "i" (-EFAULT), "0" (oparg), "1" (0))
...@@ -35,11 +32,9 @@ ...@@ -35,11 +32,9 @@
3: .section .fixup,\"ax\"\n \ 3: .section .fixup,\"ax\"\n \
4: mov %5, %1\n \ 4: mov %5, %1\n \
jmp 3b\n \ jmp 3b\n \
.previous\n \ .previous\n" \
.section __ex_table,\"a\"\n \ _ASM_EXTABLE(1b,4b) \
.align 8\n" \ _ASM_EXTABLE(2b,4b) \
_ASM_PTR "1b,4b,2b,4b\n \
.previous" \
: "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \
"=&r" (tem) \ "=&r" (tem) \
: "r" (oparg), "i" (-EFAULT), "1" (0)) : "r" (oparg), "i" (-EFAULT), "1" (0))
...@@ -111,18 +106,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) ...@@ -111,18 +106,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
return -EFAULT; return -EFAULT;
__asm__ __volatile__( __asm__ __volatile__(
"1: lock; cmpxchgl %3, %1 \n" "1: lock; cmpxchgl %3, %1 \n"
"2: .section .fixup, \"ax\" \n" "2: .section .fixup, \"ax\" \n"
"3: mov %2, %0 \n" "3: mov %2, %0 \n"
" jmp 2b \n" " jmp 2b \n"
" .previous \n" " .previous \n"
_ASM_EXTABLE(1b,3b)
" .section __ex_table, \"a\" \n"
" .align 8 \n"
_ASM_PTR " 1b,3b \n"
" .previous \n"
: "=a" (oldval), "+m" (*uaddr) : "=a" (oldval), "+m" (*uaddr)
: "i" (-EFAULT), "r" (newval), "0" (oldval) : "i" (-EFAULT), "r" (newval), "0" (oldval)
: "memory" : "memory"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment