<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/powerpc/math-emu/math.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2013-08-14T04:59:57Z</updated>
<entry>
<title>powerpc/math-emu: Fix load/store indexed emulation</title>
<updated>2013-08-14T04:59:57Z</updated>
<author>
<name>James Yang</name>
<email>James.Yang@freescale.com</email>
</author>
<published>2013-07-04T21:18:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cc7059b5ea730edde256deb94a42f8e9e732d9b8'/>
<id>urn:sha1:cc7059b5ea730edde256deb94a42f8e9e732d9b8</id>
<content type='text'>
Load/store indexed instructions where the index register RA=R0, such
as "lfdx f1,0,r3", are not illegal.

Load/store indexed with update instructions where the index register
RA=R0, such as "lfdux f1,0,r3", are invalid, and, to be consistent
with existing math-emu behavior for other invalid instruction forms,
will signal as illegal.

Signed-off-by: James Yang &lt;James.Yang@freescale.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Make flush_fp_to_thread() nop when CONFIG_PPC_FPU is disabled</title>
<updated>2013-08-14T04:59:44Z</updated>
<author>
<name>Kevin Hao</name>
<email>haokexin@gmail.com</email>
</author>
<published>2013-07-14T09:02:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=037f0eed57c3f35367ac32275e45f24e297549e9'/>
<id>urn:sha1:037f0eed57c3f35367ac32275e45f24e297549e9</id>
<content type='text'>
In the current kernel, the function flush_fp_to_thread() is not
dependent on CONFIG_PPC_FPU. So most invocations of this function
is not wrapped by CONFIG_PPC_FPU. Even through we don't really
save the FPRs to the thread struct if CONFIG_PPC_FPU is not enabled,
but there does have some runtime overhead such as the check for
tsk-&gt;thread.regs and preempt disable and enable. It really make
no sense to do that. So make it a nop when CONFIG_PPC_FPU is
disabled. Also remove the wrapped #ifdef CONFIG_PPC_FPU
when invoking this function.

Signed-off-by: Kevin Hao &lt;haokexin@gmail.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: split She math emulation into two parts</title>
<updated>2013-08-14T04:59:19Z</updated>
<author>
<name>Kevin Hao</name>
<email>haokexin@gmail.com</email>
</author>
<published>2013-07-16T11:57:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e05c0e81b0628808a7490c35d1803644a18b0405'/>
<id>urn:sha1:e05c0e81b0628808a7490c35d1803644a18b0405</id>
<content type='text'>
For some SoC (such as the FSL BookE) even though there does have
a hardware FPU, but not all floating point instructions are
implemented. Unfortunately some versions of gcc do use these
unimplemented instructions. Then we have to enable the math emulation
to workaround this issue. It seems a little redundant to have the
support to emulate all the floating point instructions in this case.
So split the math emulation into two parts. One is for the SoC which
doesn't have FPU at all and the other for the SoC which does have the
hardware FPU and only need some special floating point instructions to
be emulated.

Signed-off-by: Kevin Hao &lt;haokexin@gmail.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/math-emu: Move the flush FPU state function into do_mathemu</title>
<updated>2013-08-14T04:59:06Z</updated>
<author>
<name>Kevin Hao</name>
<email>haokexin@gmail.com</email>
</author>
<published>2013-07-14T08:40:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6761ee3d7e139ec8728e1515bfc5fdcaf3be317e'/>
<id>urn:sha1:6761ee3d7e139ec8728e1515bfc5fdcaf3be317e</id>
<content type='text'>
By doing this we can make sure that the FPU state is only flushed to
the thread struct when it is really needed.

Signed-off-by: Kevin Hao &lt;haokexin@gmail.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/math-emu: Remove the unneeded check for CONFIG_MATH_EMULATION in math.c</title>
<updated>2013-08-14T04:58:46Z</updated>
<author>
<name>Kevin Hao</name>
<email>haokexin@gmail.com</email>
</author>
<published>2013-07-10T01:43:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f0870c55301da7e27be53d65dc62020a0fba749a'/>
<id>urn:sha1:f0870c55301da7e27be53d65dc62020a0fba749a</id>
<content type='text'>
The math.c is only built when CONFIG_MATH_EMULATION is enabled.
So the #ifdef check for CONFIG_MATH_EMULATION in it seems redundant.
Drop all of them.

Signed-off-by: Kevin Hao &lt;haokexin@gmail.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/math-emu: Remove the dead code in math.c</title>
<updated>2013-08-14T04:58:40Z</updated>
<author>
<name>Kevin Hao</name>
<email>haokexin@gmail.com</email>
</author>
<published>2013-07-10T01:43:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cf5c2e543c7b4a5ec49f547070c0f3f4c95e20ed'/>
<id>urn:sha1:cf5c2e543c7b4a5ec49f547070c0f3f4c95e20ed</id>
<content type='text'>
The math.c is only built when CONFIG_MATH_EMULATION is enabled.
So we would never get into the case that CONFIG_MATH_EMULATION
is not defined in this file.

Signed-off-by: Kevin Hao &lt;haokexin@gmail.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/math-emu: Fix decoding of some instructions</title>
<updated>2013-06-20T07:05:05Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2013-06-09T07:00:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04ae9001719c3f0012d239a7c5aa4136f6b6541d'/>
<id>urn:sha1:04ae9001719c3f0012d239a7c5aa4136f6b6541d</id>
<content type='text'>
The decoding of some instructions such as fsqrt{s} was incorrect,
using the wrong registers, and thus could not work.

This fixes it and also adds a couple of place holders for missing
instructions.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/math-emu: Use kernel generic math-emu code</title>
<updated>2008-10-01T13:40:07Z</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2008-06-04T07:59:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d2b194ed820880eb19c43b9c10d9f5f30026ee54'/>
<id>urn:sha1:d2b194ed820880eb19c43b9c10d9f5f30026ee54</id>
<content type='text'>
The math emulation code is centered around a set of generic macros that
provide the core of the emulation that are shared by the various
architectures and other projects (like glibc).  Each arch implements its
own sfp-machine.h to specific various arch specific details.

For historic reasons that are now lost the powerpc math-emu code had
its own version of the common headers.  This moves us to using the
kernel generic version and thus getting fixes when those are updated.

Also cleaned up exception/error reporting from the FP emulation functions.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Add macros to access floating point registers in thread_struct.</title>
<updated>2008-07-01T01:28:43Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2008-06-26T07:07:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9c75a31c3525a127f70b919856e32be3d8b03755'/>
<id>urn:sha1:9c75a31c3525a127f70b919856e32be3d8b03755</id>
<content type='text'>
We are going to change where the floating point registers are stored
in the thread_struct, so in preparation add some macros to access the
floating point registers.  Update all code to use these new macros.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Fix handling of stfiwx math emulation</title>
<updated>2007-10-16T14:05:24Z</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2007-10-11T22:07:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ba02946a903015840ef672ccc9dc8620a7e83de6'/>
<id>urn:sha1:ba02946a903015840ef672ccc9dc8620a7e83de6</id>
<content type='text'>
Its legal for the stfiwx instruction to have RA = 0 as part of its
effective address calculation.  This is illegal for all other XE
form instructions.

Add code to compute the proper effective address for stfiwx if
RA = 0 rather than treating it as illegal.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
</entry>
</feed>
