]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
c6x: switch to RAW_COPY_USER
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 28 Mar 2017 05:11:14 +0000 (01:11 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 28 Mar 2017 22:23:28 +0000 (18:23 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/c6x/Kconfig
arch/c6x/include/asm/uaccess.h

index 5aa8ea8bad2db1cde0719d2bec9144d1c894b832..3c7bd9a29f907834e39027f990dece16c8e38b35 100644 (file)
@@ -18,6 +18,7 @@ config C6X
        select GENERIC_CLOCKEVENTS
        select MODULES_USE_ELF_RELA
        select ARCH_NO_COHERENT_DMA_MMAP
+       select ARCH_HAS_RAW_COPY_USER
 
 config MMU
        def_bool n
index 174f3bd811b24fbfd23bd92451f74fd01fdd19f8..ba6756879f0014c31ad77fbfd558e1db9e423d9e 100644 (file)
 #include <linux/string.h>
 
 /*
- * __copy_from_user/copy_to_user are based on ones in asm-generic/uaccess.h
- *
  * C6X supports unaligned 32 and 64 bit loads and stores.
  */
-static inline __must_check long __copy_from_user(void *to,
-               const void __user *from, unsigned long n)
+static inline __must_check unsigned long
+raw_copy_from_user(void *to, const void __user *from, unsigned long n)
 {
        u32 tmp32;
        u64 tmp64;
@@ -54,8 +52,8 @@ static inline __must_check long __copy_from_user(void *to,
        return 0;
 }
 
-static inline __must_check long __copy_to_user(void __user *to,
-               const void *from, unsigned long n)
+static inline __must_check unsigned long
+raw_copy_to_user(void __user *to, const void *from, unsigned long n)
 {
        u32 tmp32;
        u64 tmp64;
@@ -89,6 +87,8 @@ static inline __must_check long __copy_to_user(void __user *to,
        memcpy((void __force *)to, from, n);
        return 0;
 }
+#define INLINE_COPY_FROM_USER
+#define INLINE_COPY_TO_USER
 
 extern int _access_ok(unsigned long addr, unsigned long size);
 #ifdef CONFIG_ACCESS_CHECK