diff options
author | Michal Simek <monstr@monstr.eu> | 2010-03-05 12:03:53 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-04-01 02:38:20 -0400 |
commit | c77a9c4bb7b6e26400853c92d74ccc697c5e2f7e (patch) | |
tree | c6674242c991741852518bf61061152fe42110b0 /arch/microblaze/include | |
parent | 40b1156db09ab2df48aa4970ddf4a27a17246f1f (diff) |
microblaze: uaccess: fix __get_user_asm macro
It is used __FIXUP_SECTION and __EX_TABLE_SECTION macros.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index fdb1c1cf51ad..531172e1d1f3 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -231,24 +231,25 @@ extern long strnlen_user(const char *src, long count); | |||
231 | __gu_err; \ | 231 | __gu_err; \ |
232 | }) | 232 | }) |
233 | 233 | ||
234 | #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ | 234 | #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ |
235 | ({ \ | 235 | ({ \ |
236 | __asm__ __volatile__ ( \ | 236 | __asm__ __volatile__ ( \ |
237 | "1:" insn " %1, %2, r0; \ | 237 | "1:" insn " %1, %2, r0;" \ |
238 | addk %0, r0, r0; \ | 238 | " addk %0, r0, r0;" \ |
239 | 2: \ | 239 | "2: " \ |
240 | .section .fixup,\"ax\"; \ | 240 | __FIXUP_SECTION \ |
241 | 3: brid 2b; \ | 241 | "3: brid 2b; " \ |
242 | addik %0, r0, %3; \ | 242 | " addik %0, r0, %3;" \ |
243 | .previous; \ | 243 | ".previous;" \ |
244 | .section __ex_table,\"a\"; \ | 244 | __EX_TABLE_SECTION \ |
245 | .word 1b,3b; \ | 245 | ".word 1b,3b;" \ |
246 | .previous;" \ | 246 | ".previous;" \ |
247 | : "=r"(__gu_err), "=r"(__gu_val) \ | 247 | : "=&r"(__gu_err), "=r"(__gu_val) \ |
248 | : "r"(__gu_ptr), "i"(-EFAULT) \ | 248 | : "r"(__gu_ptr), "i"(-EFAULT) \ |
249 | ); \ | 249 | ); \ |
250 | }) | 250 | }) |
251 | 251 | ||
252 | |||
252 | #define __put_user(x, ptr) \ | 253 | #define __put_user(x, ptr) \ |
253 | ({ \ | 254 | ({ \ |
254 | __typeof__(*(ptr)) volatile __gu_val = (x); \ | 255 | __typeof__(*(ptr)) volatile __gu_val = (x); \ |