diff options
Diffstat (limited to 'include/asm-x86/futex_64.h')
-rw-r--r-- | include/asm-x86/futex_64.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/include/asm-x86/futex_64.h b/include/asm-x86/futex_64.h index 5cdfb08013c3..02964d225d18 100644 --- a/include/asm-x86/futex_64.h +++ b/include/asm-x86/futex_64.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/futex.h> | 6 | #include <linux/futex.h> |
7 | |||
8 | #include <asm/asm.h> | ||
7 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
8 | #include <asm/system.h> | 10 | #include <asm/system.h> |
9 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
@@ -16,13 +18,13 @@ | |||
16 | jmp 2b\n\ | 18 | jmp 2b\n\ |
17 | .previous\n\ | 19 | .previous\n\ |
18 | .section __ex_table,\"a\"\n\ | 20 | .section __ex_table,\"a\"\n\ |
19 | .align 8\n\ | 21 | .align 8\n" \ |
20 | .quad 1b,3b\n\ | 22 | _ASM_PTR "1b,3b\n \ |
21 | .previous" \ | 23 | .previous" \ |
22 | : "=r" (oldval), "=r" (ret), "=m" (*uaddr) \ | 24 | : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ |
23 | : "i" (-EFAULT), "m" (*uaddr), "0" (oparg), "1" (0)) | 25 | : "i" (-EFAULT), "0" (oparg), "1" (0)) |
24 | 26 | ||
25 | #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ | 27 | #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ |
26 | __asm__ __volatile ( \ | 28 | __asm__ __volatile ( \ |
27 | "1: movl %2, %0\n\ | 29 | "1: movl %2, %0\n\ |
28 | movl %0, %3\n" \ | 30 | movl %0, %3\n" \ |
@@ -34,12 +36,12 @@ | |||
34 | jmp 3b\n\ | 36 | jmp 3b\n\ |
35 | .previous\n\ | 37 | .previous\n\ |
36 | .section __ex_table,\"a\"\n\ | 38 | .section __ex_table,\"a\"\n\ |
37 | .align 8\n\ | 39 | .align 8\n" \ |
38 | .quad 1b,4b,2b,4b\n\ | 40 | _ASM_PTR "1b,4b,2b,4b\n \ |
39 | .previous" \ | 41 | .previous" \ |
40 | : "=&a" (oldval), "=&r" (ret), "=m" (*uaddr), \ | 42 | : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ |
41 | "=&r" (tem) \ | 43 | "=&r" (tem) \ |
42 | : "r" (oparg), "i" (-EFAULT), "m" (*uaddr), "1" (0)) | 44 | : "r" (oparg), "i" (-EFAULT), "1" (0)) |
43 | 45 | ||
44 | static inline int | 46 | static inline int |
45 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | 47 | 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) | |||
110 | 112 | ||
111 | " .section __ex_table, \"a\" \n" | 113 | " .section __ex_table, \"a\" \n" |
112 | " .align 8 \n" | 114 | " .align 8 \n" |
113 | " .quad 1b,3b \n" | 115 | _ASM_PTR " 1b,3b \n" |
114 | " .previous \n" | 116 | " .previous \n" |
115 | 117 | ||
116 | : "=a" (oldval), "=m" (*uaddr) | 118 | : "=a" (oldval), "+m" (*uaddr) |
117 | : "i" (-EFAULT), "r" (newval), "0" (oldval) | 119 | : "i" (-EFAULT), "r" (newval), "0" (oldval) |
118 | : "memory" | 120 | : "memory" |
119 | ); | 121 | ); |