]> git.baikalelectronics.ru Git - 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)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 19 Sep 2016 14:18:05 +0000 (16:18 +0200)
commite93f71b839144f6cdb1f10aca00edef58f1f5204
treefdae16ab753b2b0a055188f8b7eb48c6170a2477
parentedad537363899daf64c6f7a87afa18d5307a84c7
MIPS: Avoid a BUG warning during prctl(PR_SET_FP_MODE, ...)

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
Cc: stable@vger.kernel.org # 4.0+
Patchwork: https://patchwork.linux-mips.org/patch/14125/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/process.c