]> git.baikalelectronics.ru Git - kernel.git/commit
sh: Fix occasional FPU register corruption under preempt.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 26 Mar 2008 10:02:47 +0000 (19:02 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 26 Mar 2008 10:02:47 +0000 (19:02 +0900)
commit838feb654b697119c3dd2e3e80ac3b607af267f2
tree8deae79efc43d39763bdba8ca9b670e6a1782859
parentde5f5fcfac36c82093fdb7e594181e70675fbdd5
sh: Fix occasional FPU register corruption under preempt.

Presently with preempt enabled there's the possibility to be preempted
after the TIF_USEDFPU test and the register save, leading to bogus
state post-__switch_to(). Use an explicit preempt_disable()/enable()
pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86
change.

Reported-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/sh2a/fpu.c
arch/sh/kernel/cpu/sh4/fpu.c
arch/sh/kernel/cpu/sh5/fpu.c
arch/sh/kernel/dump_task.c
arch/sh/kernel/process_32.c
arch/sh/kernel/signal_32.c
include/asm-sh/fpu.h
include/asm-sh/processor.h
include/asm-sh/processor_32.h
include/asm-sh/processor_64.h