diff options
author | Michal Simek <monstr@monstr.eu> | 2010-03-05 18:03:53 +0100 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-04-01 08:38:20 +0200 |
commit | c77a9c4bb7b6e26400853c92d74ccc697c5e2f7e (patch) | |
tree | c6674242c991741852518bf61061152fe42110b0 /arch/microblaze/include/asm/uaccess.h | |
parent | 40b1156db09ab2df48aa4970ddf4a27a17246f1f (diff) | |
download | op-kernel-dev-c77a9c4bb7b6e26400853c92d74ccc697c5e2f7e.zip op-kernel-dev-c77a9c4bb7b6e26400853c92d74ccc697c5e2f7e.tar.gz |
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/asm/uaccess.h')
-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 fdb1c1c..531172e 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); __gu_err; \ }) -#define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ -({ \ - __asm__ __volatile__ ( \ - "1:" insn " %1, %2, r0; \ - addk %0, r0, r0; \ - 2: \ - .section .fixup,\"ax\"; \ - 3: brid 2b; \ - addik %0, r0, %3; \ - .previous; \ - .section __ex_table,\"a\"; \ - .word 1b,3b; \ - .previous;" \ - : "=r"(__gu_err), "=r"(__gu_val) \ - : "r"(__gu_ptr), "i"(-EFAULT) \ - ); \ +#define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ +({ \ + __asm__ __volatile__ ( \ + "1:" insn " %1, %2, r0;" \ + " addk %0, r0, r0;" \ + "2: " \ + __FIXUP_SECTION \ + "3: brid 2b; " \ + " addik %0, r0, %3;" \ + ".previous;" \ + __EX_TABLE_SECTION \ + ".word 1b,3b;" \ + ".previous;" \ + : "=&r"(__gu_err), "=r"(__gu_val) \ + : "r"(__gu_ptr), "i"(-EFAULT) \ + ); \ }) + #define __put_user(x, ptr) \ ({ \ __typeof__(*(ptr)) volatile __gu_val = (x); \ |