From: Markos Chandras Date: Wed, 4 Dec 2013 09:58:36 +0000 (+0000) Subject: MIPS: futex: Add EVA support for futex operations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6813fe5c28656b9a5d7d4f515c689876802d947;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git MIPS: futex: Add EVA support for futex operations Use LLE/SCE instructions for performing an address translation for userspace when EVA is enabled. Signed-off-by: Markos Chandras --- diff --git a/arch/mips/include/asm/futex.h b/arch/mips/include/asm/futex.h index 6ea15815d3ee..1fe2cd6cdca0 100644 --- a/arch/mips/include/asm/futex.h +++ b/arch/mips/include/asm/futex.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -49,11 +50,11 @@ " .set push \n" \ " .set noat \n" \ " .set mips3 \n" \ - "1: ll %1, %4 # __futex_atomic_op \n" \ + "1: "user_ll("%1", "%4")" # __futex_atomic_op\n" \ " .set mips0 \n" \ " " insn " \n" \ " .set mips3 \n" \ - "2: sc $1, %2 \n" \ + "2: "user_sc("$1", "%2")" \n" \ " beqz $1, 1b \n" \ __WEAK_LLSC_MB \ "3: \n" \ @@ -174,12 +175,12 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, " .set push \n" " .set noat \n" " .set mips3 \n" - "1: ll %1, %3 \n" + "1: "user_ll("%1", "%3")" \n" " bne %1, %z4, 3f \n" " .set mips0 \n" " move $1, %z5 \n" " .set mips3 \n" - "2: sc $1, %2 \n" + "2: "user_sc("$1", "%2")" \n" " beqz $1, 1b \n" __WEAK_LLSC_MB "3: \n"