aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-05-31 11:19:50 -0400
committerRalf Baechle <ralf@linux-mips.org>2017-06-28 06:22:40 -0400
commit203e090ade7357101e40a3d3aad3af77653da8df (patch)
tree0bbfe0180b114216c5b0aaf0387dd4198ab8598b
parent4915e1b043d6286928207b1f6968197b50407294 (diff)
MIPS: Branch straight to ll in mips_atomic_set()
Adjust the atomic loop in the MIPS_ATOMIC_SET operation of the sysmips system call to branch straight back to the linked load rather than jumping via a different subsection (whose purpose remains a mystery to me). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16150/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/syscall.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 863f958c126c..58c6f634b550 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -137,13 +137,9 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new)
137 " move %[tmp], %[new] \n" 137 " move %[tmp], %[new] \n"
138 "2: \n" 138 "2: \n"
139 user_sc("%[tmp]", "(%[addr])") 139 user_sc("%[tmp]", "(%[addr])")
140 " beqz %[tmp], 4f \n" 140 " beqz %[tmp], 1b \n"
141 "3: \n" 141 "3: \n"
142 " .insn \n" 142 " .insn \n"
143 " .subsection 2 \n"
144 "4: b 1b \n"
145 " .previous \n"
146 " \n"
147 " .section .fixup,\"ax\" \n" 143 " .section .fixup,\"ax\" \n"
148 "5: li %[err], %[efault] \n" 144 "5: li %[err], %[efault] \n"
149 " j 3b \n" 145 " j 3b \n"