1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_UACCESS_64_H
3 #define __ASM_SH_UACCESS_64_H
6 * include/asm-sh/uaccess_64.h
8 * Copyright (C) 2000, 2001 Paolo Alberelli
9 * Copyright (C) 2003, 2004 Paul Mundt
11 * User space memory access functions
13 * Copyright (C) 1999 Niibe Yutaka
16 * MIPS implementation version 1.15 by
17 * Copyright (C) 1996, 1997, 1998 by Ralf Baechle
21 #define __get_user_size(x,ptr,size,retval) \
27 retval = __get_user_asm_b((void *)&x, \
31 retval = __get_user_asm_w((void *)&x, \
35 retval = __get_user_asm_l((void *)&x, \
39 retval = __get_user_asm_q((void *)&x, \
43 __get_user_unknown(); \
48 extern long __get_user_asm_b(void *, long);
49 extern long __get_user_asm_w(void *, long);
50 extern long __get_user_asm_l(void *, long);
51 extern long __get_user_asm_q(void *, long);
52 extern void __get_user_unknown(void);
54 #define __put_user_size(x,ptr,size,retval) \
59 retval = __put_user_asm_b((void *)&x, \
63 retval = __put_user_asm_w((void *)&x, \
67 retval = __put_user_asm_l((void *)&x, \
71 retval = __put_user_asm_q((void *)&x, \
75 __put_user_unknown(); \
79 extern long __put_user_asm_b(void *, long);
80 extern long __put_user_asm_w(void *, long);
81 extern long __put_user_asm_l(void *, long);
82 extern long __put_user_asm_q(void *, long);
83 extern void __put_user_unknown(void);
85 #endif /* __ASM_SH_UACCESS_64_H */