aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/microblaze/include/asm/uaccess.h12
-rw-r--r--arch/microblaze/lib/uaccess.c7
2 files changed, 13 insertions, 6 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 5431b4631a7a..371bd6e56d9a 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -272,8 +272,9 @@ static inline int clear_user(char *to, int size)
272 return size; 272 return size;
273} 273}
274 274
275extern unsigned long __copy_tofrom_user(void __user *to, 275#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
276 const void __user *from, unsigned long size); 276#define __copy_from_user_inatomic(to, from, n) \
277 copy_from_user((to), (from), (n))
277 278
278#define copy_to_user(to, from, n) \ 279#define copy_to_user(to, from, n) \
279 (access_ok(VERIFY_WRITE, (to), (n)) ? \ 280 (access_ok(VERIFY_WRITE, (to), (n)) ? \
@@ -290,10 +291,6 @@ extern unsigned long __copy_tofrom_user(void __user *to,
290 (void __user *)(from), (n)) \ 291 (void __user *)(from), (n)) \
291 : -EFAULT) 292 : -EFAULT)
292 293
293#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
294#define __copy_from_user_inatomic(to, from, n) \
295 copy_from_user((to), (from), (n))
296
297extern int __strncpy_user(char *to, const char __user *from, int len); 294extern int __strncpy_user(char *to, const char __user *from, int len);
298extern int __strnlen_user(const char __user *sstr, int len); 295extern int __strnlen_user(const char __user *sstr, int len);
299 296
@@ -305,6 +302,9 @@ extern int __strnlen_user(const char __user *sstr, int len);
305 302
306#endif /* CONFIG_MMU */ 303#endif /* CONFIG_MMU */
307 304
305extern unsigned long __copy_tofrom_user(void __user *to,
306 const void __user *from, unsigned long size);
307
308/* 308/*
309 * The exception table consists of pairs of addresses: the first is the 309 * The exception table consists of pairs of addresses: the first is the
310 * address of an instruction that is allowed to fault, and the second is 310 * address of an instruction that is allowed to fault, and the second is
diff --git a/arch/microblaze/lib/uaccess.c b/arch/microblaze/lib/uaccess.c
index 8eb9df5a26c9..a853fe089c44 100644
--- a/arch/microblaze/lib/uaccess.c
+++ b/arch/microblaze/lib/uaccess.c
@@ -39,3 +39,10 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
39 __do_strncpy_from_user(dst, src, count, res); 39 __do_strncpy_from_user(dst, src, count, res);
40 return res; 40 return res;
41} 41}
42
43unsigned long __copy_tofrom_user(void __user *to,
44 const void __user *from, unsigned long size)
45{
46 memcpy(to, from, size);
47 return 0;
48}