kernel_optimize_test/arch/mips/math-emu
Maciej W. Rozycki 03dce59527 MIPS: Fix a preemption issue with thread's FPU defaults
Fix "BUG: using smp_processor_id() in preemptible" reported in accesses
to thread's FPU defaults: the value to initialise FSCR to at program
startup, the FCSR r/w mask and the contents of FIR in full FPU
emulation, removing a regression introduced with 9b26616c [MIPS: Respect
the ISA level in FCSR handling] and f6843626 [MIPS: math-emu: Set FIR
feature flags for full emulation].

Use `boot_cpu_data' to obtain the data from, following the approach that
`cpu_has_*' macros take and avoiding the call to `smp_processor_id' made
in the reference to `current_cpu_data'.  The contents of FSCR have to be
consistent across processors in an SMP system, the settings there must
not change as a thread is migrated across processors.  And the contents
of FIR are guaranteed to be consistent in FPU emulation, by definition.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Tested-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Tested-by: Paul Martin <paul.martin@codethink.co.uk>
Cc: Markos Chandras <Markos.Chandras@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10030/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-05-12 23:15:49 +02:00
..
cp1emu.c
dp_add.c
dp_cmp.c
dp_div.c
dp_fint.c
dp_flong.c
dp_fsp.c
dp_mul.c
dp_simple.c
dp_sqrt.c
dp_sub.c
dp_tint.c
dp_tlong.c
dsemul.c
ieee754.c
ieee754.h
ieee754d.c
ieee754dp.c
ieee754dp.h
ieee754int.h
ieee754sp.c
ieee754sp.h
Makefile
me-debugfs.c
sp_add.c
sp_cmp.c
sp_div.c
sp_fdp.c
sp_fint.c
sp_flong.c
sp_mul.c
sp_simple.c
sp_sqrt.c
sp_sub.c
sp_tint.c
sp_tlong.c