MIPS: Cleanup LLBit handling in switch_to
authorPaul Burton <paul.burton@imgtec.com>
Mon, 17 Oct 2016 14:34:36 +0000 (15:34 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:42 +0000 (16:34 +0100)
commit3b4b82399c4557666d348bed1aefc21c999e79a1
treea046c6b1a4f1e7232d3518dcd3d2623ec7d4d1c4
parente11124d8ffcdf893d64e0b29624fd88e0ae4ceac
MIPS: Cleanup LLBit handling in switch_to

Commit 7c151d3d5d7a ("MIPS: Make use of the ERETNC instruction on MIPS
R6") began clearing LLBit during context switches, but did so on all
systems where it is writable for unclear reasons & did so from a macro
with "software_ll_bit" in its name, which is intended to operate on the
ll_bit variable used by ll/sc emulation for old CPUs.

We do now need to clear LLBit on MIPSr6 systems where we'll use eretnc
to return to userland, but we don't need to do so on MIPSr5 systems with
a writable LLBit.

Move the clear to its own appropriately named macro, do it only for
MIPSr6 systems & comment about why.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14409/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/switch_to.h