ARC: uaccess: enable INLINE_COPY_{TO,FROM}_USER ...
... and switch to generic out of line version in lib/usercopy.c Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
839cc2954c
commit
e13909a4ac
2 changed files with 6 additions and 24 deletions
|
@ -168,7 +168,7 @@
|
||||||
|
|
||||||
|
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
__arc_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)
|
||||||
{
|
{
|
||||||
long res = 0;
|
long res = 0;
|
||||||
char val;
|
char val;
|
||||||
|
@ -395,7 +395,7 @@ __arc_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
__arc_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)
|
||||||
{
|
{
|
||||||
long res = 0;
|
long res = 0;
|
||||||
char val;
|
char val;
|
||||||
|
@ -721,24 +721,20 @@ static inline long __arc_strnlen_user(const char __user *s, long n)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
#define raw_copy_from_user __arc_copy_from_user
|
|
||||||
#define raw_copy_to_user __arc_copy_to_user
|
#define INLINE_COPY_TO_USER
|
||||||
|
#define INLINE_COPY_FROM_USER
|
||||||
|
|
||||||
#define __clear_user(d, n) __arc_clear_user(d, n)
|
#define __clear_user(d, n) __arc_clear_user(d, n)
|
||||||
#define __strncpy_from_user(d, s, n) __arc_strncpy_from_user(d, s, n)
|
#define __strncpy_from_user(d, s, n) __arc_strncpy_from_user(d, s, n)
|
||||||
#define __strnlen_user(s, n) __arc_strnlen_user(s, n)
|
#define __strnlen_user(s, n) __arc_strnlen_user(s, n)
|
||||||
#else
|
#else
|
||||||
extern long arc_copy_from_user_noinline(void *to, const void __user * from,
|
|
||||||
unsigned long n);
|
|
||||||
extern long arc_copy_to_user_noinline(void __user *to, const void *from,
|
|
||||||
unsigned long n);
|
|
||||||
extern unsigned long arc_clear_user_noinline(void __user *to,
|
extern unsigned long arc_clear_user_noinline(void __user *to,
|
||||||
unsigned long n);
|
unsigned long n);
|
||||||
extern long arc_strncpy_from_user_noinline (char *dst, const char __user *src,
|
extern long arc_strncpy_from_user_noinline (char *dst, const char __user *src,
|
||||||
long count);
|
long count);
|
||||||
extern long arc_strnlen_user_noinline(const char __user *src, long n);
|
extern long arc_strnlen_user_noinline(const char __user *src, long n);
|
||||||
|
|
||||||
#define raw_copy_from_user arc_copy_from_user_noinline
|
|
||||||
#define raw_copy_to_user arc_copy_to_user_noinline
|
|
||||||
#define __clear_user(d, n) arc_clear_user_noinline(d, n)
|
#define __clear_user(d, n) arc_clear_user_noinline(d, n)
|
||||||
#define __strncpy_from_user(d, s, n) arc_strncpy_from_user_noinline(d, s, n)
|
#define __strncpy_from_user(d, s, n) arc_strncpy_from_user_noinline(d, s, n)
|
||||||
#define __strnlen_user(s, n) arc_strnlen_user_noinline(s, n)
|
#define __strnlen_user(s, n) arc_strnlen_user_noinline(s, n)
|
||||||
|
|
|
@ -28,20 +28,6 @@ int fixup_exception(struct pt_regs *regs)
|
||||||
|
|
||||||
#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
|
|
||||||
long arc_copy_from_user_noinline(void *to, const void __user *from,
|
|
||||||
unsigned long n)
|
|
||||||
{
|
|
||||||
return __arc_copy_from_user(to, from, n);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(arc_copy_from_user_noinline);
|
|
||||||
|
|
||||||
long arc_copy_to_user_noinline(void __user *to, const void *from,
|
|
||||||
unsigned long n)
|
|
||||||
{
|
|
||||||
return __arc_copy_to_user(to, from, n);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(arc_copy_to_user_noinline);
|
|
||||||
|
|
||||||
unsigned long arc_clear_user_noinline(void __user *to,
|
unsigned long arc_clear_user_noinline(void __user *to,
|
||||||
unsigned long n)
|
unsigned long n)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue