diff options
-rw-r--r-- | include/asm-mips/uaccess.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc53ef31..36b3a427f123 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -265,7 +265,10 @@ do { \ | |||
265 | */ | 265 | */ |
266 | #define __get_user_asm_ll32(val, addr) \ | 266 | #define __get_user_asm_ll32(val, addr) \ |
267 | { \ | 267 | { \ |
268 | unsigned long long __gu_tmp; \ | 268 | union { \ |
269 | unsigned long long l; \ | ||
270 | __typeof__(*(addr)) t; \ | ||
271 | } __gu_tmp; \ | ||
269 | \ | 272 | \ |
270 | __asm__ __volatile__( \ | 273 | __asm__ __volatile__( \ |
271 | "1: lw %1, (%3) \n" \ | 274 | "1: lw %1, (%3) \n" \ |
@@ -281,9 +284,10 @@ do { \ | |||
281 | " " __UA_ADDR " 1b, 4b \n" \ | 284 | " " __UA_ADDR " 1b, 4b \n" \ |
282 | " " __UA_ADDR " 2b, 4b \n" \ | 285 | " " __UA_ADDR " 2b, 4b \n" \ |
283 | " .previous \n" \ | 286 | " .previous \n" \ |
284 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ | 287 | : "=r" (__gu_err), "=&r" (__gu_tmp.l) \ |
285 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 288 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
286 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | 289 | \ |
290 | (val) = __gu_tmp.t; \ | ||
287 | } | 291 | } |
288 | 292 | ||
289 | /* | 293 | /* |