Lines Matching +full:sw +full:- +full:exception
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
4 * Copyright (C) 2008-2009 PetaLogix
18 #include <asm-generic/access_ok.h>
26 /* Return: number of not copied bytes, i.e. 0 if OK or non-zero if fail. */
33 " addik %0, %0, -1;" \ in __clear_user()
73 : "r"(__gu_ptr), "i"(-EFAULT) \
78 * get_user: - Get a simple variable from user space.
89 * @ptr must have pointer-to-simple-variable type, and the result of
92 * Returns zero on success, or -EFAULT on error.
98 __get_user(x, __gu_ptr) : -EFAULT; \
117 -EFAULT : 0; \
118 (x) = (typeof(x))(typeof((x) - (x)))__x; \
122 /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\
142 : "r"(__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \
162 : "r"(&__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \
167 * put_user: - Write a simple value into user space.
178 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
181 * Returns zero on success, or -EFAULT on error.
203 __put_user_asm("sw", __pu_addr, __pu_val, \
214 __pu_err = -EFAULT; \
231 __put_user_asm("sw", (ptr), __gu_val, __gu_err); \
237 /*__gu_err = -EINVAL;*/ __gu_err = __user_bad(); \
265 * Return 0 on exception, a value greater than N if too long