Commit 86944ee1 authored by Al Viro's avatar Al Viro

c6x: switch to RAW_COPY_USER

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent dcecd936
...@@ -18,6 +18,7 @@ config C6X ...@@ -18,6 +18,7 @@ config C6X
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select MODULES_USE_ELF_RELA select MODULES_USE_ELF_RELA
select ARCH_NO_COHERENT_DMA_MMAP select ARCH_NO_COHERENT_DMA_MMAP
select ARCH_HAS_RAW_COPY_USER
config MMU config MMU
def_bool n def_bool n
......
...@@ -14,12 +14,10 @@ ...@@ -14,12 +14,10 @@
#include <linux/string.h> #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. * C6X supports unaligned 32 and 64 bit loads and stores.
*/ */
static inline __must_check long __copy_from_user(void *to, static inline __must_check unsigned long
const void __user *from, unsigned long n) raw_copy_from_user(void *to, const void __user *from, unsigned long n)
{ {
u32 tmp32; u32 tmp32;
u64 tmp64; u64 tmp64;
...@@ -54,8 +52,8 @@ static inline __must_check long __copy_from_user(void *to, ...@@ -54,8 +52,8 @@ static inline __must_check long __copy_from_user(void *to,
return 0; return 0;
} }
static inline __must_check long __copy_to_user(void __user *to, static inline __must_check unsigned long
const void *from, unsigned long n) raw_copy_to_user(void __user *to, const void *from, unsigned long n)
{ {
u32 tmp32; u32 tmp32;
u64 tmp64; u64 tmp64;
...@@ -89,6 +87,8 @@ static inline __must_check long __copy_to_user(void __user *to, ...@@ -89,6 +87,8 @@ static inline __must_check long __copy_to_user(void __user *to,
memcpy((void __force *)to, from, n); memcpy((void __force *)to, from, n);
return 0; return 0;
} }
#define INLINE_COPY_FROM_USER
#define INLINE_COPY_TO_USER
extern int _access_ok(unsigned long addr, unsigned long size); extern int _access_ok(unsigned long addr, unsigned long size);
#ifdef CONFIG_ACCESS_CHECK #ifdef CONFIG_ACCESS_CHECK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment