]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
MIPS: Avoid a BUG warning during prctl(PR_SET_FP_MODE, ...)
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Wed, 31 Aug 2016 10:33:23 +0000 (12:33 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:06:26 +0000 (08:06 -0500)
commit9db8a6655ac117ca99fd414a17281c13d54a5253
tree03411cc0da746ac5ba4ba8633bc813b3824117a8
parentf0e2c1f5f4f959dc942d516441da64b403b99871
MIPS: Avoid a BUG warning during prctl(PR_SET_FP_MODE, ...)

BugLink: http://bugs.launchpad.net/bugs/1629386
commit b244614a60ab7ce54c12a9cbe15cfbf8d79d0967 upstream.

cpu_has_fpu macro uses smp_processor_id() and is currently executed
with preemption enabled, that triggers the warning at runtime.

It is assumed throughout the kernel that if any CPU has an FPU, then all
CPUs would have an FPU as well, so it is safe to perform the check with
preemption enabled - change the code to use raw_ variant of the check to
avoid the warning.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14125/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/mips/kernel/process.c