<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/sh/kernel/cpu/sh4/fpu.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-05-27T14:36:28Z</updated>
<entry>
<title>signal: Remove task parameter from force_sig</title>
<updated>2019-05-27T14:36:28Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2019-05-23T15:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3cf5d076fb4d48979f382bc9452765bf8b79e740'/>
<id>urn:sha1:3cf5d076fb4d48979f382bc9452765bf8b79e740</id>
<content type='text'>
All of the remaining callers pass current into force_sig so
remove the task parameter to make this obvious and to make
misuse more difficult in the future.

This also makes it clear force_sig passes current into force_sig_info.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>sh: sh4: convert to SPDX identifiers</title>
<updated>2018-12-28T20:11:45Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2018-12-28T08:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ecc0a4dbb076ef658cb5e140a7560d6326c8240'/>
<id>urn:sha1:6ecc0a4dbb076ef658cb5e140a7560d6326c8240</id>
<content type='text'>
Update license to use SPDX-License-Identifier instead of verbose license
text, excepting ${LINUX}/arch/sh/kernel/cpu/sh4/softfloat.c which is not
GPL license

Link: http://lkml.kernel.org/r/87a7lkcsya.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Reviewed-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into &lt;linux/sched/signal.h&gt;</title>
<updated>2017-03-03T00:43:37Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-02T07:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3edc4010e9d102eb7b8f17d15c2ebc425fed63c'/>
<id>urn:sha1:c3edc4010e9d102eb7b8f17d15c2ebc425fed63c</id>
<content type='text'>
task_struct::signal and task_struct::sighand are pointers, which would normally make it
straightforward to not define those types in sched.h.

That is not so, because the types are accompanied by a myriad of APIs (macros and inline
functions) that dereference them.

Split the types and the APIs out of sched.h and move them into a new header, &lt;linux/sched/signal.h&gt;.

With this change sched.h does not know about 'struct signal' and 'struct sighand' anymore,
trying to put accessors into sched.h as a test fails the following way:

  ./include/linux/sched.h: In function ‘test_signal_types’:
  ./include/linux/sched.h:2461:18: error: dereferencing pointer to incomplete type ‘struct signal_struct’
                    ^

This reduces the size and complexity of sched.h significantly.

Update all headers and .c code that relied on getting the signal handling
functionality from &lt;linux/sched.h&gt; to include &lt;linux/sched/signal.h&gt;.

The list of affected files in the preparatory patch was partly generated by
grepping for the APIs, and partly by doing coverage build testing, both
all[yes|mod|def|no]config builds on 64-bit and 32-bit x86, and an array of
cross-architecture builds.

Nevertheless some (trivial) build breakage is still expected related to rare
Kconfig combinations and in-flight patches to various kernel code, but most
of it should be handled by this patch.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sh: fix up fallout from system.h disintegration.</title>
<updated>2012-03-30T10:29:57Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2012-03-30T10:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f03c4866d31e913a8dbc84f7d1459abdaf0bd326'/>
<id>urn:sha1:f03c4866d31e913a8dbc84f7d1459abdaf0bd326</id>
<content type='text'>
Quite a bit of fallout all over the place, nothing terribly exciting.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>Disintegrate asm/system.h for SH</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e839ca528718e68cad32a307dc9aabf01ef3eb05'/>
<id>urn:sha1:e839ca528718e68cad32a307dc9aabf01ef3eb05</id>
<content type='text'>
Disintegrate asm/system.h for SH.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: linux-sh@vger.kernel.org
</content>
</entry>
<entry>
<title>sh: Move over to dynamically allocated FPU context.</title>
<updated>2010-01-13T03:51:40Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2010-01-13T03:51:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ea820cf9bf58f735ed40ec67947159c4f170012'/>
<id>urn:sha1:0ea820cf9bf58f735ed40ec67947159c4f170012</id>
<content type='text'>
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 &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Minor optimisations to FPU handling</title>
<updated>2009-11-24T08:45:38Z</updated>
<author>
<name>Stuart Menefy</name>
</author>
<published>2009-09-25T17:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3ea9fa0a563620fe9f416f94bb8927c64390917'/>
<id>urn:sha1:d3ea9fa0a563620fe9f416f94bb8927c64390917</id>
<content type='text'>
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-&gt;sr and thread_info-&gt;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 &lt;stuart.menefy@st.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: add sleazy FPU optimization</title>
<updated>2009-11-24T07:23:38Z</updated>
<author>
<name>Giuseppe CAVALLARO</name>
</author>
<published>2009-07-07T14:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0458b07c17a10ea316e6ae65ab15b78bf5f44ee'/>
<id>urn:sha1:a0458b07c17a10ea316e6ae65ab15b78bf5f44ee</id>
<content type='text'>
sh port of the sLeAZY-fpu feature currently implemented for some architectures
such us i386.

Right now the SH kernel has a 100% lazy fpu behaviour.
This is of course great for applications that have very sporadic or no FPU use.
However for very frequent FPU users...  you take an extra trap every context
switch.
The patch below adds a simple heuristic to this code: after 5 consecutive
context switches of FPU use, the lazy behavior is disabled and the context
gets restored every context switch.
After 256 switches, this is reset and the 100% lazy behavior is returned.

Tests with LMbench showed no regression.
I saw a little improvement due to the prefetching (~2%).

The tests below also show that, with this sLeazy patch, indeed,
the number of FPU exceptions is reduced.
To test this. I hacked the lat_ctx LMBench to use the FPU a little more.

   sLeasy implementation
   ===========================================
   switch_to calls            |  79326
   sleasy   calls             |  42577
   do_fpu_state_restore  calls|  59232
   restore_fpu   calls        |  59032

   Exceptions:  0x800 (FPU disabled  ): 16604

   100% Leazy (default implementation)
   ===========================================
   switch_to  calls            |  79690
   do_fpu_state_restore calls  |  53299
   restore_fpu  calls          |   53101

   Exceptions: 0x800 (FPU disabled  ):  53273

Signed-off-by: Giuseppe Cavallaro &lt;peppe.cavallaro@st.com&gt;
Signed-off-by: Stuart Menefy &lt;stuart.menefy@st.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: fcnvds fix with denormalized numbers on SH-4 FPU.</title>
<updated>2009-01-29T02:56:02Z</updated>
<author>
<name>Carmelo AMOROSO</name>
</author>
<published>2008-10-15T15:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f6dee232f84c11ec195721571763ccae1b82639'/>
<id>urn:sha1:0f6dee232f84c11ec195721571763ccae1b82639</id>
<content type='text'>
This fixes a bug in the FPU exception handler for the FCNVDS instruction.
To get the register number the instruction is shifted right by 9,
though it should be shifted right by 8.

More information at ST Linux bugzilla:

	https://bugzilla.stlinux.com/show_bug.cgi?id=4892

Signed-off-by: Giuseppe Di Giore &lt;giuseppe.di-giore@st.com&gt;
Signed-off-by: Carmelo Amoroso &lt;carmelo.amoroso@st.com&gt;
Signed-off-by: Stuart Menefy &lt;stuart.menefy@st.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Subnormal double to float conversion</title>
<updated>2008-09-08T01:35:05Z</updated>
<author>
<name>Carl Shaw</name>
</author>
<published>2008-09-05T07:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6ad1e8c3f76fcc5dee506d5e79e752d296ff745'/>
<id>urn:sha1:b6ad1e8c3f76fcc5dee506d5e79e752d296ff745</id>
<content type='text'>
This patch adds support for the SH4 to convert a subnormal double
into a float by catching the FPE and implementing the FCNVDS
instruction in software.

Signed-off-by: Carl Shaw &lt;carl.shaw@st.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
</feed>
