diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-28 06:36:07 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-29 00:23:26 +0200 |
commit | 50e9ab915a79b3f51f6de8ef9bbdae8279e8fa46 (patch) | |
tree | 0d54d77b5b285078494440e38706c62555a78776 /arch/blackfin/include/asm/uaccess.h | |
parent | blackfin: switch to generic extable.h (diff) | |
download | linux-50e9ab915a79b3f51f6de8ef9bbdae8279e8fa46.tar.xz linux-50e9ab915a79b3f51f6de8ef9bbdae8279e8fa46.zip |
bfin: switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/blackfin/include/asm/uaccess.h')
-rw-r--r-- | arch/blackfin/include/asm/uaccess.h | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 9019cccf2aea..f54a34f31cea 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h @@ -144,41 +144,23 @@ static inline int bad_user_access_length(void) : "a" (__ptr(ptr))); \ }) -#define __copy_to_user_inatomic __copy_to_user -#define __copy_from_user_inatomic __copy_from_user - static inline unsigned long __must_check -__copy_from_user(void *to, const void __user *from, unsigned long n) +raw_copy_from_user(void *to, const void __user *from, unsigned long n) { memcpy(to, (const void __force *)from, n); return 0; } static inline unsigned long __must_check -__copy_to_user(void __user *to, const void *from, unsigned long n) +raw_copy_to_user(void __user *to, const void *from, unsigned long n) { memcpy((void __force *)to, from, n); SSYNC(); return 0; } -static inline unsigned long __must_check -copy_from_user(void *to, const void __user *from, unsigned long n) -{ - if (likely(access_ok(VERIFY_READ, from, n))) - return __copy_from_user(to, from, n); - memset(to, 0, n); - return n; -} - -static inline unsigned long __must_check -copy_to_user(void __user *to, const void *from, unsigned long n) -{ - if (likely(access_ok(VERIFY_WRITE, to, n))) - return __copy_to_user(to, from, n); - return n; -} - +#define INLINE_COPY_FROM_USER +#define INLINE_COPY_TO_USER /* * Copy a null terminated string from userspace. */ |