summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/r4k_fpu.S
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-02-25 13:08:05 +0000
committerRalf Baechle <ralf@linux-mips.org>2015-03-27 19:39:42 +0100
commitacaf6a97d623af123314c2f8ce4cf7254f6b2fc1 (patch)
treeb7d8f63bef33bfd3da35b43f739bb798271a17f6 /arch/mips/kernel/r4k_fpu.S
parent9eccca0843205f87c00404b663188b88eb248051 (diff)
downloadblackbird-op-linux-acaf6a97d623af123314c2f8ce4cf7254f6b2fc1.tar.gz
blackbird-op-linux-acaf6a97d623af123314c2f8ce4cf7254f6b2fc1.zip
MIPS: lose_fpu(): Disable FPU when MSA enabled
The lose_fpu() function only disables the FPU in CP0_Status.CU1 if the FPU is in use and MSA isn't enabled. This isn't necessarily a problem because KSTK_STATUS(current), the version of CP0_Status stored on the kernel stack on entry from user mode, does always get updated and gets restored when returning to user mode, but I don't think it was intended, and it is inconsistent with the case of only the FPU being in use. Sometimes leaving the FPU enabled may also mask kernel bugs where FPU operations are executed when the FPU might not be enabled. So lets disable the FPU in the MSA case too. Fixes: 33c771ba5c5d ("MIPS: save/disable MSA in lose_fpu") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9323/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/r4k_fpu.S')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud