summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-06-10 02:26:33 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-06-29 02:42:24 +0200
commit6b1e76297c4ad4b906fdf054460e4e56914f6e34 (patch)
treed3c1dafa830dc078f8222b3ac3d04a11771dd063 /certs
parentMIPS: unaligned: Add DSP lwx & lhx missaligned access support (diff)
downloadlinux-6b1e76297c4ad4b906fdf054460e4e56914f6e34.tar.xz
linux-6b1e76297c4ad4b906fdf054460e4e56914f6e34.zip
MIPS: cmpxchg: Unify R10000_LLSC_WAR & non-R10000_LLSC_WAR cases
Prior to this patch the xchg & cmpxchg functions have duplicated code which is for all intents & purposes identical apart from use of a branch-likely instruction in the R10000_LLSC_WAR case & a regular branch instruction in the non-R10000_LLSC_WAR case. This patch removes the duplication, declaring a __scbeqz macro to select the branch instruction suitable for use when checking the result of an sc instruction & making use of it to unify the 2 cases. In __xchg_u{32,64}() this means writing the branch in asm, where it was previously being done in C as a do...while loop for the non-R10000_LLSC_WAR case. As this is a single instruction, and adds consistency with the R10000_LLSC_WAR cases & the cmpxchg() code, this seems worthwhile. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16348/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions