]>
Commit | Line | Data |
---|---|---|
381a4dca GKH |
1 | From 2e6c7747730296a6d4fd700894286db1132598c4 Mon Sep 17 00:00:00 2001 |
2 | From: James Hogan <james.hogan@imgtec.com> | |
3 | Date: Thu, 16 Feb 2017 12:39:01 +0000 | |
4 | Subject: MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels | |
5 | ||
6 | From: James Hogan <james.hogan@imgtec.com> | |
7 | ||
8 | commit 2e6c7747730296a6d4fd700894286db1132598c4 upstream. | |
9 | ||
10 | When a 32-bit kernel is configured to support MIPS64r6 (CPU_MIPS64_R6), | |
11 | MIPS_O32_FP64_SUPPORT won't be selected as it should be because | |
12 | MIPS32_O32 is disabled (o32 is already the default ABI available on | |
13 | 32-bit kernels). | |
14 | ||
15 | This results in userland FP breakage as CP0_Status.FR is read-only 1 | |
16 | since r6 (when an FPU is present) so __enable_fpu() will fail to clear | |
17 | FR. This causes the FPU emulator to get used which will incorrectly | |
18 | emulate 32-bit FPU registers. | |
19 | ||
20 | Force o32 fp64 support in this case by also selecting | |
21 | MIPS_O32_FP64_SUPPORT from CPU_MIPS64_R6 if 32BIT. | |
22 | ||
23 | Fixes: 4e9d324d4288 ("MIPS: Require O32 FP64 support for MIPS64 with O32 compat") | |
24 | Signed-off-by: James Hogan <james.hogan@imgtec.com> | |
25 | Reviewed-by: Paul Burton <paul.burton@imgtec.com> | |
26 | Cc: Ralf Baechle <ralf@linux-mips.org> | |
27 | Cc: linux-mips@linux-mips.org | |
28 | Patchwork: https://patchwork.linux-mips.org/patch/15310/ | |
29 | Signed-off-by: James Hogan <james.hogan@imgtec.com> | |
30 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
31 | ||
32 | --- | |
33 | arch/mips/Kconfig | 2 +- | |
34 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
35 | ||
36 | --- a/arch/mips/Kconfig | |
37 | +++ b/arch/mips/Kconfig | |
38 | @@ -1412,7 +1412,7 @@ config CPU_MIPS32_R6 | |
39 | select CPU_SUPPORTS_MSA | |
40 | select GENERIC_CSUM | |
41 | select HAVE_KVM | |
42 | - select MIPS_O32_FP64_SUPPORT | |
43 | + select MIPS_O32_FP64_SUPPORT if 32BIT | |
44 | help | |
45 | Choose this option to build a kernel for release 6 or later of the | |
46 | MIPS32 architecture. New MIPS processors, starting with the Warrior |