diff options
Diffstat (limited to 'include/asm-mips/uaccess.h')
-rw-r--r-- | include/asm-mips/uaccess.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 91d813a37823..b96f3e0f3933 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -233,7 +233,7 @@ do { \ | |||
233 | #define __get_user_check(x,ptr,size) \ | 233 | #define __get_user_check(x,ptr,size) \ |
234 | ({ \ | 234 | ({ \ |
235 | long __gu_err = -EFAULT; \ | 235 | long __gu_err = -EFAULT; \ |
236 | const void __user * __gu_ptr = (ptr); \ | 236 | const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \ |
237 | \ | 237 | \ |
238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ | 238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ |
239 | __get_user_common((x), size, __gu_ptr); \ | 239 | __get_user_common((x), size, __gu_ptr); \ |
@@ -258,7 +258,7 @@ do { \ | |||
258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ | 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ |
259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ | 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ |
260 | \ | 260 | \ |
261 | (val) = (__typeof__(val)) __gu_tmp; \ | 261 | (val) = (__typeof__(*(addr))) __gu_tmp; \ |
262 | } | 262 | } |
263 | 263 | ||
264 | /* | 264 | /* |
@@ -266,6 +266,8 @@ do { \ | |||
266 | */ | 266 | */ |
267 | #define __get_user_asm_ll32(val, addr) \ | 267 | #define __get_user_asm_ll32(val, addr) \ |
268 | { \ | 268 | { \ |
269 | unsigned long long __gu_tmp; \ | ||
270 | \ | ||
269 | __asm__ __volatile__( \ | 271 | __asm__ __volatile__( \ |
270 | "1: lw %1, (%3) \n" \ | 272 | "1: lw %1, (%3) \n" \ |
271 | "2: lw %D1, 4(%3) \n" \ | 273 | "2: lw %D1, 4(%3) \n" \ |
@@ -280,8 +282,9 @@ do { \ | |||
280 | " " __UA_ADDR " 1b, 4b \n" \ | 282 | " " __UA_ADDR " 1b, 4b \n" \ |
281 | " " __UA_ADDR " 2b, 4b \n" \ | 283 | " " __UA_ADDR " 2b, 4b \n" \ |
282 | " .previous \n" \ | 284 | " .previous \n" \ |
283 | : "=r" (__gu_err), "=&r" (val) \ | 285 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ |
284 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 286 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
287 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | ||
285 | } | 288 | } |
286 | 289 | ||
287 | /* | 290 | /* |