aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/uaccess_64.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-25 12:17:43 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 03:14:26 -0400
commite30a44fdbf11c7ca3a0096d71790f176a4a09e03 (patch)
tree21d173ba08e47cb539c965dfb5119ff9f3b28d04 /include/asm-x86/uaccess_64.h
parentec840956d269e2beefe3a1c0fd7c1c70a199087f (diff)
x86: merge put_user.
Move both versions, which are highly similar, to uaccess.h. Note that, for x86_64, X86_WP_WORKS_OK is always defined. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/uaccess_64.h')
-rw-r--r--include/asm-x86/uaccess_64.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index 9139854d37b0..2e75a5d1a17a 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -11,18 +11,6 @@
11 11
12#define ARCH_HAS_SEARCH_EXTABLE 12#define ARCH_HAS_SEARCH_EXTABLE
13 13
14extern void __put_user_1(void);
15extern void __put_user_2(void);
16extern void __put_user_4(void);
17extern void __put_user_8(void);
18extern void __put_user_bad(void);
19
20#define __put_user_x(size, ret, x, ptr) \
21 asm volatile("call __put_user_" #size \
22 :"=a" (ret) \
23 :"c" (ptr),"a" (x) \
24 :"ebx")
25
26#define __get_user(x, ptr) \ 14#define __get_user(x, ptr) \
27 __get_user_nocheck((x), (ptr), sizeof(*(ptr))) 15 __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
28#define __put_user(x, ptr) \ 16#define __put_user(x, ptr) \
@@ -31,30 +19,6 @@ extern void __put_user_bad(void);
31#define __get_user_unaligned __get_user 19#define __get_user_unaligned __get_user
32#define __put_user_unaligned __put_user 20#define __put_user_unaligned __put_user
33 21
34#define put_user(x, ptr) \
35({ \
36 int __pu_err; \
37 typeof(*(ptr)) __user *__pu_addr = (ptr); \
38 __chk_user_ptr(ptr); \
39 switch (sizeof(*(ptr))) { \
40 case 1: \
41 __put_user_x(1, __pu_err, x, __pu_addr); \
42 break; \
43 case 2: \
44 __put_user_x(2, __pu_err, x, __pu_addr); \
45 break; \
46 case 4: \
47 __put_user_x(4, __pu_err, x, __pu_addr); \
48 break; \
49 case 8: \
50 __put_user_x(8, __pu_err, x, __pu_addr); \
51 break; \
52 default: \
53 __put_user_bad(); \
54 } \
55 __pu_err; \
56})
57
58/* 22/*
59 * Copy To/From Userspace 23 * Copy To/From Userspace
60 */ 24 */