]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: Branch straight to ll in mips_atomic_set()
authorJames Hogan <james.hogan@imgtec.com>
Wed, 31 May 2017 15:19:50 +0000 (16:19 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 28 Jun 2017 10:22:40 +0000 (12:22 +0200)
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>
arch/mips/kernel/syscall.c

index 863f958c126c9a3df533c02fa1fb3def4a8e738f..58c6f634b5506a32858fb9f036c7aff465363fb5 100644 (file)
@@ -137,13 +137,9 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new)
                "       move    %[tmp], %[new]                          \n"
                "2:                                                     \n"
                user_sc("%[tmp]", "(%[addr])")
-               "       beqz    %[tmp], 4f                              \n"
+               "       beqz    %[tmp], 1b                              \n"
                "3:                                                     \n"
                "       .insn                                           \n"
-               "       .subsection 2                                   \n"
-               "4:     b       1b                                      \n"
-               "       .previous                                       \n"
-               "                                                       \n"
                "       .section .fixup,\"ax\"                          \n"
                "5:     li      %[err], %[efault]                       \n"
                "       j       3b                                      \n"