Commit c77a9c4b authored by Michal Simek's avatar Michal Simek

microblaze: uaccess: fix __get_user_asm macro

It is used __FIXUP_SECTION and __EX_TABLE_SECTION macros.
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 40b1156d
...@@ -234,21 +234,22 @@ extern long strnlen_user(const char *src, long count); ...@@ -234,21 +234,22 @@ extern long strnlen_user(const char *src, long count);
#define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \
({ \ ({ \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"1:" insn " %1, %2, r0; \ "1:" insn " %1, %2, r0;" \
addk %0, r0, r0; \ " addk %0, r0, r0;" \
2: \ "2: " \
.section .fixup,\"ax\"; \ __FIXUP_SECTION \
3: brid 2b; \ "3: brid 2b; " \
addik %0, r0, %3; \ " addik %0, r0, %3;" \
.previous; \ ".previous;" \
.section __ex_table,\"a\"; \ __EX_TABLE_SECTION \
.word 1b,3b; \ ".word 1b,3b;" \
.previous;" \ ".previous;" \
: "=r"(__gu_err), "=r"(__gu_val) \ : "=&r"(__gu_err), "=r"(__gu_val) \
: "r"(__gu_ptr), "i"(-EFAULT) \ : "r"(__gu_ptr), "i"(-EFAULT) \
); \ ); \
}) })
#define __put_user(x, ptr) \ #define __put_user(x, ptr) \
({ \ ({ \
__typeof__(*(ptr)) volatile __gu_val = (x); \ __typeof__(*(ptr)) volatile __gu_val = (x); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment