diff options
Diffstat (limited to 'include/asm-cris')
-rw-r--r-- | include/asm-cris/uaccess.h | 53 |
1 files changed, 9 insertions, 44 deletions
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 | ||
212 | extern unsigned long __copy_user(void *to, const void *from, unsigned long n); | 175 | extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n); |
213 | extern unsigned long __copy_user_zeroing(void *to, const void *from, unsigned long n); | 176 | extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n); |
214 | extern unsigned long __do_clear_user(void *to, unsigned long n); | 177 | extern unsigned long __do_clear_user(void __user *to, unsigned long n); |
215 | 178 | ||
216 | static inline unsigned long | 179 | static 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 | ||
259 | static inline unsigned long | 222 | static inline unsigned long |
@@ -407,19 +370,21 @@ __constant_clear_user(void __user *to, unsigned long n) | |||
407 | */ | 370 | */ |
408 | 371 | ||
409 | static inline unsigned long | 372 | static 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 | ||
415 | static inline unsigned long | 379 | static 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 | ||
421 | static inline unsigned long | 386 | static 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 | } |