<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/mips/include/asm/fpu.h, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-05-17T23:11:51Z</updated>
<entry>
<title>MIPS: lose_fpu(): Disable FPU when MSA enabled</title>
<updated>2015-05-17T23:11:51Z</updated>
<author>
<name>James Hogan</name>
</author>
<published>2015-02-25T13:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00f1187a9cb84924936a4b6310e36be2ad0e8a15'/>
<id>urn:sha1:00f1187a9cb84924936a4b6310e36be2ad0e8a15</id>
<content type='text'>
[ Upstream commit f8483988cadd7dd22de928db29ed3bcbe02faf78 ]

The lose_fpu() function only disables the FPU in CP0_Status.CU1 if the
FPU is in use and MSA isn't enabled.

This isn't necessarily a problem because KSTK_STATUS(current), the
version of CP0_Status stored on the kernel stack on entry from user
mode, does always get updated and gets restored when returning to user
mode, but I don't think it was intended, and it is inconsistent with the
case of only the FPU being in use. Sometimes leaving the FPU enabled may
also mask kernel bugs where FPU operations are executed when the FPU
might not be enabled.

So lets disable the FPU in the MSA case too.

Fixes: 33c771ba5c5d ("MIPS: save/disable MSA in lose_fpu")
Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9323/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>MIPS: Fix build with binutils 2.24.51+</title>
<updated>2014-11-07T14:07:36Z</updated>
<author>
<name>Manuel Lauss</name>
</author>
<published>2014-11-07T13:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=842dfc11ea9a21f9825167c8a4f2834b205b0a79'/>
<id>urn:sha1:842dfc11ea9a21f9825167c8a4f2834b205b0a79</id>
<content type='text'>
Starting with version 2.24.51.20140728 MIPS binutils complain loudly
about mixing soft-float and hard-float object files, leading to this
build failure since GCC is invoked with "-msoft-float" on MIPS:

{standard input}: Warning: .gnu_attribute 4,3 requires `softfloat'
  LD      arch/mips/alchemy/common/built-in.o
mipsel-softfloat-linux-gnu-ld: Warning: arch/mips/alchemy/common/built-in.o
 uses -msoft-float (set by arch/mips/alchemy/common/prom.o),
 arch/mips/alchemy/common/sleeper.o uses -mhard-float

To fix this, we detect if GAS is new enough to support "-msoft-float" command
option, and if it does, we can let GCC pass it to GAS;  but then we also need
to sprinkle the files which make use of floating point registers with the
necessary ".set hardfloat" directives.

Signed-off-by: Manuel Lauss &lt;manuel.lauss@gmail.com&gt;
Cc: Linux-MIPS &lt;linux-mips@linux-mips.org&gt;
Cc: Matthew Fortune &lt;Matthew.Fortune@imgtec.com&gt;
Cc: Markos Chandras &lt;Markos.Chandras@imgtec.com&gt;
Cc: Maciej W. Rozycki &lt;macro@linux-mips.org&gt;
Patchwork: https://patchwork.linux-mips.org/patch/8355/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: disable preemption whilst initialising MSA</title>
<updated>2014-08-01T22:06:44Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2014-07-11T15:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=762a1f4388a22690cd4f848ba858e5f02d4bfc22'/>
<id>urn:sha1:762a1f4388a22690cd4f848ba858e5f02d4bfc22</id>
<content type='text'>
Preemption must be disabled throughout the process of enabling the FPU,
enabling MSA &amp; initialising the vector registers. Without doing so it
is possible to lose the FPU or MSA whilst initialising them causing
that initialisation to fail.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7307/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: save/disable MSA in lose_fpu</title>
<updated>2014-08-01T22:06:43Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2014-07-11T15:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33c771ba5c5d067f85a5a6c4b11047219b5b8f4e'/>
<id>urn:sha1:33c771ba5c5d067f85a5a6c4b11047219b5b8f4e</id>
<content type='text'>
The kernel depends upon MSA never being enabled when the FPU is not, a
condition which is currently violated in a few places (whilst saving
sigcontext, following mips_cpu_save). Catch all the problem cases by
disabling MSA in lose_fpu, after saving context if necessary.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7302/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Inline fpu_emulator_init_fpu()</title>
<updated>2014-05-23T13:12:37Z</updated>
<author>
<name>Ralf Baechle</name>
</author>
<published>2014-04-28T20:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0cc3a42eb50593a50e2b99d9dc92b4279f2efda'/>
<id>urn:sha1:e0cc3a42eb50593a50e2b99d9dc92b4279f2efda</id>
<content type='text'>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>Merge branch '3.14-fixes' into mips-for-linux-next</title>
<updated>2014-03-31T16:17:33Z</updated>
<author>
<name>Ralf Baechle</name>
</author>
<published>2014-03-31T16:17:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ade63aada79c61bcd5f51cbd310f237399892268'/>
<id>urn:sha1:ade63aada79c61bcd5f51cbd310f237399892268</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MIPS: Simplify FP context access</title>
<updated>2014-03-26T22:09:09Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2014-02-13T11:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbd426f542cb61f2322e15dab4507f2661090c06'/>
<id>urn:sha1:bbd426f542cb61f2322e15dab4507f2661090c06</id>
<content type='text'>
This patch replaces the fpureg_t typedef with a "union fpureg" enabling
easier access to 32 &amp; 64 bit values. This allows the access macros used
in cp1emu.c to be simplified somewhat. It will also make it easier to
expand the width of the FP registers as will be done in a future
patch in order to support the 128 bit registers introduced with MSA.

No behavioural change is intended by this patch.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Reviewed-by: Qais Yousef &lt;qais.yousef@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6532/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Replace CONFIG_MIPS64 and CONFIG_MIPS32_R2</title>
<updated>2014-03-14T16:49:16Z</updated>
<author>
<name>Paul Bolle</name>
</author>
<published>2014-02-09T13:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5868f05dc976ecd849d2a8115fab80301c127cd'/>
<id>urn:sha1:f5868f05dc976ecd849d2a8115fab80301c127cd</id>
<content type='text'>
Commit 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries")
introduced references to two undefined Kconfig macros. CONFIG_MIPS32_R2
should clearly be replaced with CONFIG_CPU_MIPS32_R2. And CONFIG_MIPS64
should be replaced with CONFIG_64BIT.

Signed-off-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6522/
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: fpu.h: Fix build when CONFIG_BUG is not set</title>
<updated>2014-02-06T12:42:43Z</updated>
<author>
<name>Aaro Koskinen</name>
</author>
<published>2014-02-05T20:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97b8b16bfcb7f5ccc1b3c10c08580f9f1acb61ac'/>
<id>urn:sha1:97b8b16bfcb7f5ccc1b3c10c08580f9f1acb61ac</id>
<content type='text'>
__enable_fpu produces a build failure when CONFIG_BUG is not set:

In file included from arch/mips/kernel/cpu-probe.c:24:0:
arch/mips/include/asm/fpu.h: In function '__enable_fpu':
arch/mips/include/asm/fpu.h:77:1: error: control reaches end of non-void function [-Werror=return-type]

This is regression introduced in 3.14-rc1. Fix that.

Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Acked-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: John Crispin &lt;blogic@openwrt.org&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6504/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Support for 64-bit FP with O32 binaries</title>
<updated>2014-01-13T22:40:56Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2013-11-22T13:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=597ce1723e0fa0bdbe2ae4c94f18da6e29b92635'/>
<id>urn:sha1:597ce1723e0fa0bdbe2ae4c94f18da6e29b92635</id>
<content type='text'>
CPUs implementing MIPS32 R2 may include a 64-bit FPU, just as MIPS64 CPUs
do. In order to preserve backwards compatibility a 64-bit FPU will act
like a 32-bit FPU (by accessing doubles from the least significant 32
bits of an even-odd pair of FP registers) when the Status.FR bit is
zero, again just like a mips64 CPU. The standard O32 ABI is defined
expecting a 32-bit FPU, however recent toolchains support use of a
64-bit FPU from an O32 MIPS32 executable. When an ELF executable is
built to use a 64-bit FPU a new flag (EF_MIPS_FP64) is set in the ELF
header.

With this patch the kernel will check the EF_MIPS_FP64 flag when
executing an O32 binary, and set Status.FR accordingly. The addition
of O32 64-bit FP support lessens the opportunity for optimisation in
the FPU emulator, so a CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option is
introduced to allow this support to be disabled for those that don't
require it.

Inspired by an earlier patch by Leonid Yegoshin, but implemented more
cleanly &amp; correctly.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: Paul Burton &lt;paul.burton@imgtec.com&gt;
Patchwork: https://patchwork.linux-mips.org/patch/6154/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
