aboutsummaryrefslogtreecommitdiff
path: root/include/asm-x86/futex_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/futex_64.h')
-rw-r--r--include/asm-x86/futex_64.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/asm-x86/futex_64.h b/include/asm-x86/futex_64.h
index 5cdfb08013c..02964d225d1 100644
--- a/include/asm-x86/futex_64.h
+++ b/include/asm-x86/futex_64.h
@@ -4,6 +4,8 @@
#ifdef __KERNEL__
#include <linux/futex.h>
+
+#include <asm/asm.h>
#include <asm/errno.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -16,13 +18,13 @@
jmp 2b\n\
.previous\n\
.section __ex_table,\"a\"\n\
- .align 8\n\
- .quad 1b,3b\n\
+ .align 8\n" \
+ _ASM_PTR "1b,3b\n \
.previous" \
- : "=r" (oldval), "=r" (ret), "=m" (*uaddr) \
- : "i" (-EFAULT), "m" (*uaddr), "0" (oparg), "1" (0))
+ : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
+ : "i" (-EFAULT), "0" (oparg), "1" (0))
-#define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \
+#define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \
__asm__ __volatile ( \
"1: movl %2, %0\n\
movl %0, %3\n" \
@@ -34,12 +36,12 @@
jmp 3b\n\
.previous\n\
.section __ex_table,\"a\"\n\
- .align 8\n\
- .quad 1b,4b,2b,4b\n\
+ .align 8\n" \
+ _ASM_PTR "1b,4b,2b,4b\n \
.previous" \
- : "=&a" (oldval), "=&r" (ret), "=m" (*uaddr), \
+ : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \
"=&r" (tem) \
- : "r" (oparg), "i" (-EFAULT), "m" (*uaddr), "1" (0))
+ : "r" (oparg), "i" (-EFAULT), "1" (0))
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
@@ -110,10 +112,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
" .section __ex_table, \"a\" \n"
" .align 8 \n"
- " .quad 1b,3b \n"
+ _ASM_PTR " 1b,3b \n"
" .previous \n"
- : "=a" (oldval), "=m" (*uaddr)
+ : "=a" (oldval), "+m" (*uaddr)
: "i" (-EFAULT), "r" (newval), "0" (oldval)
: "memory"
);