summaryrefslogtreecommitdiff
path: root/include/asm-x86/uaccess_64.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-25 19:48:47 +0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 11:14:24 +0400
commit3f168221167ca7a844fde3bf58e1c7ca0bf9741e (patch)
treeca51b618a7319488049b151d9e03d899170106df /include/asm-x86/uaccess_64.h
parent6fd4725d75c5049641640ce23fa5896501dfbd42 (diff)
downloadlinux-3f168221167ca7a844fde3bf58e1c7ca0bf9741e.tar.xz
x86: merge __get_user_asm and its users.
Move __get_user_asm and __get_user_size and __get_user_nocheck to uaccess.h. This requires us to define a macro at __get_user_size for the 64-bit access case. 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.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index e0875d7ae898..42a9769687e9 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -57,49 +57,6 @@ extern void __put_user_bad(void);
__pu_err; \
})
-#define __get_user_nocheck(x, ptr, size) \
-({ \
- int __gu_err; \
- unsigned long __gu_val; \
- __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT);\
- (x) = (__force typeof(*(ptr)))__gu_val; \
- __gu_err; \
-})
-
-#define __get_user_size(x, ptr, size, retval, errret) \
-do { \
- retval = 0; \
- __chk_user_ptr(ptr); \
- switch (size) { \
- case 1: \
- __get_user_asm(x, ptr, retval, "b", "b", "=q", errret);\
- break; \
- case 2: \
- __get_user_asm(x, ptr, retval, "w", "w", "=r", errret);\
- break; \
- case 4: \
- __get_user_asm(x, ptr, retval, "l", "k", "=r", errret);\
- break; \
- case 8: \
- __get_user_asm(x, ptr, retval, "q", "", "=r", errret); \
- break; \
- default: \
- (x) = __get_user_bad(); \
- } \
-} while (0)
-
-#define __get_user_asm(x, addr, err, itype, rtype, ltype, errno) \
- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
- "2:\n" \
- ".section .fixup, \"ax\"\n" \
- "3: mov %3,%0\n" \
- " xor"itype" %"rtype"1,%"rtype"1\n" \
- " jmp 2b\n" \
- ".previous\n" \
- _ASM_EXTABLE(1b, 3b) \
- : "=r" (err), ltype (x) \
- : "m" (__m(addr)), "i"(errno), "0"(err))
-
/*
* Copy To/From Userspace
*/