Lines Matching refs:ptr
30 * @ptr: Source address, in user space.
39 * @ptr must have pointer-to-simple-variable type, and the result of
40 * dereferencing @ptr must be assignable to @x without a cast.
45 #define get_user(x, ptr) \
47 const __typeof__(*(ptr)) __user *__p = (ptr); \
57 * @ptr: Destination address, in user space.
66 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
67 * to the result of dereferencing @ptr.
71 #define put_user(x, ptr) \
73 __typeof__(*(ptr)) __user *__p = (ptr); \
82 * @ptr: Source address, in user space.
91 * @ptr must have pointer-to-simple-variable type, and the result of
92 * dereferencing @ptr must be assignable to @x without a cast.
100 #define __get_user(x, ptr) \
104 __chk_user_ptr(ptr); \
105 __get_user_common((x), sizeof(*(ptr)), ptr); \
112 * @ptr: Destination address, in user space.
121 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
122 * to the result of dereferencing @ptr.
129 #define __put_user(x, ptr) \
132 __typeof__(*(ptr)) __pu_val; \
135 __chk_user_ptr(ptr); \
136 __put_user_common(ptr, sizeof(*(ptr))); \
143 #define __get_user_common(val, size, ptr) \
146 case 1: __get_data_asm(val, "ld.b", ptr); break; \
147 case 2: __get_data_asm(val, "ld.h", ptr); break; \
148 case 4: __get_data_asm(val, "ld.w", ptr); break; \
149 case 8: __get_data_asm(val, "ld.d", ptr); break; \
154 #define __get_kernel_common(val, size, ptr) __get_user_common(val, size, ptr)
156 #define __get_data_asm(val, insn, ptr) \
165 : "m" (__m(ptr))); \
167 (val) = (__typeof__(*(ptr))) __gu_tmp; \
170 #define __put_user_common(ptr, size) \
173 case 1: __put_data_asm("st.b", ptr); break; \
174 case 2: __put_data_asm("st.h", ptr); break; \
175 case 4: __put_data_asm("st.w", ptr); break; \
176 case 8: __put_data_asm("st.d", ptr); break; \
181 #define __put_kernel_common(ptr, size) __put_user_common(ptr, size)
183 #define __put_data_asm(insn, ptr) \
189 : "+r" (__pu_err), "=m" (__m(ptr)) \