Commit 95dfbbe4 authored by John Williams's avatar John Williams Committed by Michal Simek

microblaze: Simple __copy_tofrom_user for noMMU

This is first patch which clear part of uaccess.h.
uaccess.h will be clear later.
Signed-off-by: default avatarJohn Williams <john.williams@petalogix.com>
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent fd6ed51f
...@@ -272,8 +272,9 @@ static inline int clear_user(char *to, int size) ...@@ -272,8 +272,9 @@ static inline int clear_user(char *to, int size)
return size; return size;
} }
extern unsigned long __copy_tofrom_user(void __user *to, #define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
const void __user *from, unsigned long size); #define __copy_from_user_inatomic(to, from, n) \
copy_from_user((to), (from), (n))
#define copy_to_user(to, from, n) \ #define copy_to_user(to, from, n) \
(access_ok(VERIFY_WRITE, (to), (n)) ? \ (access_ok(VERIFY_WRITE, (to), (n)) ? \
...@@ -290,10 +291,6 @@ extern unsigned long __copy_tofrom_user(void __user *to, ...@@ -290,10 +291,6 @@ extern unsigned long __copy_tofrom_user(void __user *to,
(void __user *)(from), (n)) \ (void __user *)(from), (n)) \
: -EFAULT) : -EFAULT)
#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
#define __copy_from_user_inatomic(to, from, n) \
copy_from_user((to), (from), (n))
extern int __strncpy_user(char *to, const char __user *from, int len); extern int __strncpy_user(char *to, const char __user *from, int len);
extern int __strnlen_user(const char __user *sstr, int len); extern int __strnlen_user(const char __user *sstr, int len);
...@@ -305,6 +302,9 @@ extern int __strnlen_user(const char __user *sstr, int len); ...@@ -305,6 +302,9 @@ extern int __strnlen_user(const char __user *sstr, int len);
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
extern unsigned long __copy_tofrom_user(void __user *to,
const void __user *from, unsigned long size);
/* /*
* The exception table consists of pairs of addresses: the first is the * The exception table consists of pairs of addresses: the first is the
* address of an instruction that is allowed to fault, and the second is * address of an instruction that is allowed to fault, and the second is
......
...@@ -39,3 +39,10 @@ long strncpy_from_user(char *dst, const char __user *src, long count) ...@@ -39,3 +39,10 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
__do_strncpy_from_user(dst, src, count, res); __do_strncpy_from_user(dst, src, count, res);
return res; return res;
} }
unsigned long __copy_tofrom_user(void __user *to,
const void __user *from, unsigned long size)
{
memcpy(to, from, size);
return 0;
}
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