History log of /arch/sh/kernel/cpu/sh2a/fpu.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f03c4866d31e913a8dbc84f7d1459abdaf0bd326 30-Mar-2012 Paul Mundt <lethal@linux-sh.org> sh: fix up fallout from system.h disintegration.

Quite a bit of fallout all over the place, nothing terribly exciting.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/arch/sh/kernel/cpu/sh2a/fpu.c
0ea820cf9bf58f735ed40ec67947159c4f170012 12-Jan-2010 Paul Mundt <lethal@linux-sh.org> sh: Move over to dynamically allocated FPU context.

This follows the x86 xstate changes and implements a task_xstate slab
cache that is dynamically sized to match one of hard FP/soft FP/FPU-less.

This also tidies up and consolidates some of the SH-2A/SH-4 FPU
fragmentation. Now fpu state restorers are commonly defined, with the
init_fpu()/fpu_init() mess reworked to follow the x86 convention.
The fpu_init() register initialization has been replaced by xstate setup
followed by writing out to hardware via the standard restore path.

As init_fpu() now performs a slab allocation a secondary lighterweight
restorer is also introduced for the context switch.

In the future the DSP state will be rolled in here, too.

More work remains for math emulation and the SH-5 FPU, which presently
uses its own special (UP-only) interfaces.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/arch/sh/kernel/cpu/sh2a/fpu.c
0f09e197a39c081fa8c2752ee65919cb6cba963a 24-Nov-2009 Paul Mundt <lethal@linux-sh.org> sh: Apply the sleazy FPU changes for SH-2A FPU as well.

This plugs in the fpu_counter manipulation for the SH-2A side also.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/arch/sh/kernel/cpu/sh2a/fpu.c
d3ea9fa0a563620fe9f416f94bb8927c64390917 25-Sep-2009 Stuart Menefy <stuart.menefy@st.com> 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>
/arch/sh/kernel/cpu/sh2a/fpu.c
9731e287e08b804592191d8bffaad023154af2aa 09-May-2008 Roel Kluin <12o3l@tiscali.nl> SH: catch negative denormal_subf1() retval in denormal_add()

'ix' is unsigned but denormal_subf1() may return a negative int.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/arch/sh/kernel/cpu/sh2a/fpu.c
9bbafce2eec190ef7e44b0eb1095ba17ce6ad3af 26-Mar-2008 Paul Mundt <lethal@linux-sh.org> 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
74d99a5e262229ee865f6f68528d10b82471ead6 26-Nov-2007 Paul Mundt <lethal@linux-sh.org> sh: SH-2A FPU support.

Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/arch/sh/kernel/cpu/sh2a/fpu.c