linux/arch/sh/kernel/cpu/sh2a
Stuart Menefy d3ea9fa0a5 sh: Minor optimisations to FPU handling
A number of small optimisations to FPU handling, in particular:

 - move the task USEDFPU flag from the thread_info flags field (which
   is accessed asynchronously to the thread) to a new status field,
   which is only accessed by the thread itself. This allows locking to
   be removed in most cases, or can be reduced to a preempt_lock().
   This mimics the i386 behaviour.

 - move the modification of regs->sr and thread_info->status flags out
   of save_fpu() to __unlazy_fpu(). This gives the compiler a better
   chance to optimise things, as well as making save_fpu() symmetrical
   with restore_fpu() and init_fpu().

 - implement prepare_to_copy(), so that when creating a thread, we can
   unlazy the FPU prior to copying the thread data structures.

Also make sure that the FPU is disabled while in the kernel, in
particular while booting, and for newly created kernel threads,

In a very artificial benchmark, the execution time for 2500000
context switches was reduced from 50 to 45 seconds.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-24 17:45:38 +09:00
..
clock-sh7201.c sh: clkfwk: Make recalc return an unsigned long. 2009-05-12 03:45:08 +09:00
clock-sh7203.c sh: clkfwk: Add a followparent_recalc() helper. 2009-05-12 03:50:44 +09:00
clock-sh7206.c sh: clkfwk: Make recalc return an unsigned long. 2009-05-12 03:45:08 +09:00
entry.S sh: Make sure rte delay slots are nopped out on all parts. 2009-08-15 07:41:45 +09:00
ex.S sh2(A) exception handler update 2008-07-28 18:10:34 +09:00
fpu.c sh: Minor optimisations to FPU handling 2009-11-24 17:45:38 +09:00
Makefile sh: Add support for SH7201 CPU subtype. 2008-12-22 18:43:50 +09:00
opcode_helper.c sh: Support for SH-2A 32-bit opcodes. 2007-05-09 01:35:01 +00:00
pinmux-sh7203.c sh: improve pinmux support for single direction pins 2008-10-22 18:34:16 +09:00
probe.c sh: Track the CPU family in sh_cpuinfo. 2009-08-15 10:48:13 +09:00
setup-mxg.c sh: convert processor device setup functions to arch_initcall() 2009-07-23 13:06:07 +09:00
setup-sh7201.c sh: convert processor device setup functions to arch_initcall() 2009-07-23 13:06:07 +09:00
setup-sh7203.c sh: convert processor device setup functions to arch_initcall() 2009-07-23 13:06:07 +09:00
setup-sh7206.c sh: convert processor device setup functions to arch_initcall() 2009-07-23 13:06:07 +09:00