• J
    MIPS: Fix delay slot bug in `atomic*_sub_if_positive' for R10000_LLSC_WAR · a0a5ac3c
    Joshua Kinard 提交于
    This patch fixes an old bug in MIPS ll/sc atomics, in the
    `atomic_sub_if_positive' and `atomic64_sub_if_positive' functions, for
    the R10000_LLSC_WAR case where the result of the subu/dsubu instruction
    would potentially not be made available to the sc/scd instruction due
    to being in the delay-slot of the branch-likely (beqzl) instruction.
    
    This also removes the need for the `noreorder' directive, allowing GAS
    to use delay slot scheduling as needed.
    
    The same fix is also applied to the standard branch (beqz) case in
    preparation for a follow-up patch that will cleanup/merge the
    R10000_LLSC_WAR and non-R10K sections together.
    Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
    Signed-off-by: NPaul Burton <paul.burton@mips.com>
    Tested-by: NJoshua Kinard <kumba@gentoo.org>
    Patchwork: https://patchwork.linux-mips.org/patch/17735/
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: James Hogan <james.hogan@mips.com>
    Cc: "Maciej W. Rozycki" <macro@mips.com>
    Cc: linux-mips@linux-mips.org
    a0a5ac3c
atomic.h 19.5 KB