Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcc53b5f authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle
Browse files

MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU



Commit 6134d949 ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6")
added support for 64-bit FPU on a 32-bit MIPS R6 processor but it missed
the 64-bit CPU case leading to FPU failures when requesting FR=1 mode
(which is always the case for MIPS R6 userland) when running a 32-bit
kernel on a 64-bit CPU. We also fix the MIPS R2 case.

Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Fixes: 6134d949 ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6")
Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: <stable@vger.kernel.org> # 4.0+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10734/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent dd0bc75e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
		goto fr_common;

	case FPU_64BIT:
#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_CPU_MIPS32_R6) \
#if !(defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) \
      || defined(CONFIG_64BIT))
		/* we only have a 32-bit FPU */
		return SIGFPE;