aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/cris/arch-v10/lib/usercopy.c2
-rw-r--r--arch/cris/arch-v32/lib/usercopy.c2
-rw-r--r--include/asm-cris/uaccess.h53
3 files changed, 11 insertions, 46 deletions
diff --git a/arch/cris/arch-v10/lib/usercopy.c b/arch/cris/arch-v10/lib/usercopy.c
index b8e6c0430e5b..b0a608da7bd1 100644
--- a/arch/cris/arch-v10/lib/usercopy.c
+++ b/arch/cris/arch-v10/lib/usercopy.c
@@ -193,7 +193,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn)
193 inaccessible. */ 193 inaccessible. */
194 194
195unsigned long 195unsigned long
196__copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) 196__copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn)
197{ 197{
198 /* We want the parameters put in special registers. 198 /* We want the parameters put in special registers.
199 Make sure the compiler is able to make something useful of this. 199 Make sure the compiler is able to make something useful of this.
diff --git a/arch/cris/arch-v32/lib/usercopy.c b/arch/cris/arch-v32/lib/usercopy.c
index 04d0cf35a276..0b5b70d5f58a 100644
--- a/arch/cris/arch-v32/lib/usercopy.c
+++ b/arch/cris/arch-v32/lib/usercopy.c
@@ -161,7 +161,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn)
161 inaccessible. */ 161 inaccessible. */
162 162
163unsigned long 163unsigned long
164__copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) 164__copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn)
165{ 165{
166 /* We want the parameters put in special registers. 166 /* We want the parameters put in special registers.
167 Make sure the compiler is able to make something useful of this. 167 Make sure the compiler is able to make something useful of this.
diff --git a/include/asm-cris/uaccess.h b/include/asm-cris/uaccess.h
index 69d48a2dc8e1..ea11eaf0e922 100644
--- a/include/asm-cris/uaccess.h
+++ b/include/asm-cris/uaccess.h
@@ -1,43 +1,6 @@
1/* 1/*
2 * Authors: Bjorn Wesen (bjornw@axis.com) 2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 * Hans-Peter Nilsson (hp@axis.com) 3 * Hans-Peter Nilsson (hp@axis.com)
4 *
5 * $Log: uaccess.h,v $
6 * Revision 1.8 2001/10/29 13:01:48 bjornw
7 * Removed unused variable tmp2 in strnlen_user
8 *
9 * Revision 1.7 2001/10/02 12:44:52 hp
10 * Add support for 64-bit put_user/get_user
11 *
12 * Revision 1.6 2001/10/01 14:51:17 bjornw
13 * Added register prefixes and removed underscores
14 *
15 * Revision 1.5 2000/10/25 03:33:21 hp
16 * - Provide implementation for everything else but get_user and put_user;
17 * copying inline to/from user for constant length 0..16, 20, 24, and
18 * clearing for 0..4, 8, 12, 16, 20, 24, strncpy_from_user and strnlen_user
19 * always inline.
20 * - Constraints for destination addr in get_user cannot be memory, only reg.
21 * - Correct labels for PC at expected fault points.
22 * - Nits with assembly code.
23 * - Don't use statement expressions without value; use "do {} while (0)".
24 * - Return correct values from __generic_... functions.
25 *
26 * Revision 1.4 2000/09/12 16:28:25 bjornw
27 * * Removed comments from the get/put user asm code
28 * * Constrains for destination addr in put_user cannot be memory, only reg
29 *
30 * Revision 1.3 2000/09/12 14:30:20 bjornw
31 * MAX_ADDR_USER does not exist anymore
32 *
33 * Revision 1.2 2000/07/13 15:52:48 bjornw
34 * New user-access functions
35 *
36 * Revision 1.1.1.1 2000/07/10 16:32:31 bjornw
37 * CRIS architecture, working draft
38 *
39 *
40 *
41 */ 4 */
42 5
43/* Asm:s have been tweaked (within the domain of correctness) to give 6/* Asm:s have been tweaked (within the domain of correctness) to give
@@ -209,9 +172,9 @@ extern long __get_user_bad(void);
209/* More complex functions. Most are inline, but some call functions that 172/* More complex functions. Most are inline, but some call functions that
210 live in lib/usercopy.c */ 173 live in lib/usercopy.c */
211 174
212extern unsigned long __copy_user(void *to, const void *from, unsigned long n); 175extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n);
213extern unsigned long __copy_user_zeroing(void *to, const void *from, unsigned long n); 176extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n);
214extern unsigned long __do_clear_user(void *to, unsigned long n); 177extern unsigned long __do_clear_user(void __user *to, unsigned long n);
215 178
216static inline unsigned long 179static inline unsigned long
217__generic_copy_to_user(void __user *to, const void *from, unsigned long n) 180__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -253,7 +216,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
253} 216}
254 217
255 218
256/* Note that if these expand awfully if made into switch constructs, so 219/* Note that these expand awfully if made into switch constructs, so
257 don't do that. */ 220 don't do that. */
258 221
259static inline unsigned long 222static inline unsigned long
@@ -407,19 +370,21 @@ __constant_clear_user(void __user *to, unsigned long n)
407 */ 370 */
408 371
409static inline unsigned long 372static inline unsigned long
410__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n) 373__generic_copy_from_user_nocheck(void *to, const void __user *from,
374 unsigned long n)
411{ 375{
412 return __copy_user_zeroing(to,from,n); 376 return __copy_user_zeroing(to,from,n);
413} 377}
414 378
415static inline unsigned long 379static inline unsigned long
416__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n) 380__generic_copy_to_user_nocheck(void __user *to, const void *from,
381 unsigned long n)
417{ 382{
418 return __copy_user(to,from,n); 383 return __copy_user(to,from,n);
419} 384}
420 385
421static inline unsigned long 386static inline unsigned long
422__generic_clear_user_nocheck(void *to, unsigned long n) 387__generic_clear_user_nocheck(void __user *to, unsigned long n)
423{ 388{
424 return __do_clear_user(to,n); 389 return __do_clear_user(to,n);
425} 390}