diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-06-25 10:05:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-09 03:14:18 -0400 |
commit | 865e5b76505cdade261773bde32f785b3ce579f1 (patch) | |
tree | 3ac122f2b95162b286b1a136ec4460f422b0d8b9 /include/asm-x86/uaccess_64.h | |
parent | ca23386216b9d4fc3bb211101205077d2b2916ae (diff) |
x86: merge getuser.
Merge versions of getuser from uaccess_32.h and uaccess_64.h into
uaccess.h. There is a part which is 64-bit only (for now), and for
that, we use a __get_user_8 macro.
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.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h index 243dbb467f3a..4a44b906e4c3 100644 --- a/include/asm-x86/uaccess_64.h +++ b/include/asm-x86/uaccess_64.h | |||
@@ -14,35 +14,6 @@ | |||
14 | 14 | ||
15 | #define ARCH_HAS_SEARCH_EXTABLE | 15 | #define ARCH_HAS_SEARCH_EXTABLE |
16 | 16 | ||
17 | /* Careful: we have to cast the result to the type of the pointer | ||
18 | * for sign reasons */ | ||
19 | |||
20 | #define get_user(x, ptr) \ | ||
21 | ({ \ | ||
22 | unsigned long __val_gu; \ | ||
23 | int __ret_gu; \ | ||
24 | __chk_user_ptr(ptr); \ | ||
25 | switch (sizeof(*(ptr))) { \ | ||
26 | case 1: \ | ||
27 | __get_user_x(1, __ret_gu, __val_gu, ptr); \ | ||
28 | break; \ | ||
29 | case 2: \ | ||
30 | __get_user_x(2, __ret_gu, __val_gu, ptr); \ | ||
31 | break; \ | ||
32 | case 4: \ | ||
33 | __get_user_x(4, __ret_gu, __val_gu, ptr); \ | ||
34 | break; \ | ||
35 | case 8: \ | ||
36 | __get_user_x(8, __ret_gu, __val_gu, ptr); \ | ||
37 | break; \ | ||
38 | default: \ | ||
39 | __get_user_bad(); \ | ||
40 | break; \ | ||
41 | } \ | ||
42 | (x) = (__force typeof(*(ptr)))__val_gu; \ | ||
43 | __ret_gu; \ | ||
44 | }) | ||
45 | |||
46 | extern void __put_user_1(void); | 17 | extern void __put_user_1(void); |
47 | extern void __put_user_2(void); | 18 | extern void __put_user_2(void); |
48 | extern void __put_user_4(void); | 19 | extern void __put_user_4(void); |