]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: disable FPU if the mode is unsupported
authorPaul Burton <paul.burton@imgtec.com>
Fri, 30 Jan 2015 12:09:37 +0000 (12:09 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 27 Mar 2015 18:42:47 +0000 (19:42 +0100)
commitd7678b5da6bfe38c35c6e3c6b0011c52f2be4851
treecb2816ad87e3917b4d400660d8cc3025be373f1d
parent082c251f6ba58dfc2a5cef6f0b593e5f0eef8ded
MIPS: disable FPU if the mode is unsupported

The expected semantics of __enable_fpu are for the FPU to be enabled
in the given mode if possible, otherwise for the FPU to be left
disabled and SIGFPE returned. The FPU was incorrectly being left
enabled in cases where the desired value for FR was unavailable.
Without ensuring the FPU is disabled in this case, it would be
possible for userland to go on to execute further FP instructions
natively in the incorrect mode, rather than those instructions being
trapped & emulated as they need to be.

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