Lines Matching refs:to

18  * the "moves" instruction to access user space from kernel space. Other
23 * So lets keep the code simple and just define in what we need to use.
182 unsigned long __generic_copy_from_user(void *to, const void __user *from, unsigned long n);
183 unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned long n);
190 #define ____constant_copy_from_user_asm(res, to, from, tmp, n1, n2, n3, s1, s2, s3)\
225 : "+d" (res), "+&a" (to), "+a" (from), "=&d" (tmp) \
228 #define ___constant_copy_from_user_asm(res, to, from, tmp, n1, n2, n3, s1, s2, s3)\
229 ____constant_copy_from_user_asm(res, to, from, tmp, n1, n2, n3, s1, s2, s3)
230 #define __constant_copy_from_user_asm(res, to, from, tmp, n1, n2, n3) \
231 ___constant_copy_from_user_asm(res, to, from, tmp, n1, n2, n3, \
235 __constant_copy_from_user(void *to, const void __user *from, unsigned long n)
241 __constant_copy_from_user_asm(res, to, from, tmp, 1, 0, 0);
244 __constant_copy_from_user_asm(res, to, from, tmp, 2, 0, 0);
247 __constant_copy_from_user_asm(res, to, from, tmp, 2, 1, 0);
250 __constant_copy_from_user_asm(res, to, from, tmp, 4, 0, 0);
253 __constant_copy_from_user_asm(res, to, from, tmp, 4, 1, 0);
256 __constant_copy_from_user_asm(res, to, from, tmp, 4, 2, 0);
259 __constant_copy_from_user_asm(res, to, from, tmp, 4, 2, 1);
262 __constant_copy_from_user_asm(res, to, from, tmp, 4, 4, 0);
265 __constant_copy_from_user_asm(res, to, from, tmp, 4, 4, 1);
268 __constant_copy_from_user_asm(res, to, from, tmp, 4, 4, 2);
271 __constant_copy_from_user_asm(res, to, from, tmp, 4, 4, 4);
274 /* we limit the inlined version to 3 moves */
275 return __generic_copy_from_user(to, from, n);
281 #define __constant_copy_to_user_asm(res, to, from, tmp, n, s1, s2, s3) \
312 : "+d" (res), "+a" (to), "+a" (from), "=&d" (tmp) \
316 __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
322 __put_user_asm(MOVES, res, *(u8 *)from, (u8 __user *)to,
326 __put_user_asm(MOVES, res, *(u16 *)from, (u16 __user *)to,
330 __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,);
333 __put_user_asm(MOVES, res, *(u32 *)from, (u32 __user *)to,
337 __constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,);
340 __constant_copy_to_user_asm(res, to, from, tmp, 6, l, w,);
343 __constant_copy_to_user_asm(res, to, from, tmp, 7, l, w, b);
346 __constant_copy_to_user_asm(res, to, from, tmp, 8, l, l,);
349 __constant_copy_to_user_asm(res, to, from, tmp, 9, l, l, b);
352 __constant_copy_to_user_asm(res, to, from, tmp, 10, l, l, w);
355 __constant_copy_to_user_asm(res, to, from, tmp, 12, l, l, l);
358 /* limit the inlined version to 3 moves */
359 return __generic_copy_to_user(to, from, n);
366 raw_copy_from_user(void *to, const void __user *from, unsigned long n)
369 return __constant_copy_from_user(to, from, n);
370 return __generic_copy_from_user(to, from, n);
374 raw_copy_to_user(void __user *to, const void *from, unsigned long n)
377 return __constant_copy_to_user(to, from, n);
378 return __generic_copy_to_user(to, from, n);
444 unsigned long __clear_user(void __user *to, unsigned long n);