linux-stable/arch/sh
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
..
boards sh: Make sure indexes are positive 2009-11-04 11:48:07 +09:00
boot Merge branch 'sh/stable-updates' 2009-10-26 19:46:59 +09:00
cchips sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes. 2009-05-20 11:27:13 +09:00
configs sh: enable onenand support in kfr2r09 defconfig. 2009-09-25 11:55:07 +09:00
drivers sh: dma: Kill off bogus dma_sysclass symbol export. 2009-11-13 12:29:19 +09:00
include sh: Minor optimisations to FPU handling 2009-11-24 17:45:38 +09:00
kernel sh: Minor optimisations to FPU handling 2009-11-24 17:45:38 +09:00
lib sh: Optimised memset for SH4 2009-11-24 16:28:43 +09:00
lib64 sh64: Kill off special clear_page() implementation. 2009-08-04 17:17:00 +09:00
math-emu sh: Minor optimisations to FPU handling 2009-11-24 17:45:38 +09:00
mm sh: Improve performance of SH4 versions of copy/clear_user_highpage 2009-11-24 17:13:35 +09:00
oprofile sh: oprofile: Fix up count size mismatch for common impl. 2009-11-05 17:13:15 +09:00
tools sh: sh7785lcr: fix prototype board on 32bit MMU mode. 2009-08-28 10:19:13 +09:00
Kconfig Merge branch 'sh/stable-updates' 2009-10-27 17:10:24 +09:00
Kconfig.cpu sh: Tidy up SH-4A boot_cpu_data.flags probing. 2009-06-01 19:50:08 +09:00
Kconfig.debug sh: Add initial support for SH7757 CPU subtype 2009-08-21 17:25:47 +09:00
Makefile sh: Move ap325rxa board code into separate directory 2009-10-30 14:33:43 +09:00