]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B)
authorPaul Cercueil <paul@crapouillou.net>
Sun, 30 May 2021 17:17:57 +0000 (18:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 08:00:51 +0000 (10:00 +0200)
[ Upstream commit fc52f92a653215fbd6bc522ac5311857b335e589 ]

Ingenic JZ4760 and JZ4760B do have a FPU, but the config registers don't
report it. Force the FPU detection in case the processor ID match the
JZ4760(B) one.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/kernel/cpu-probe.c

index 0ef240adefb59d0583352ca1543c37c4efdb68c5..630fcb4cb30e73751071c5fda145ea440bef0e04 100644 (file)
@@ -1840,6 +1840,11 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
                 */
                case PRID_COMP_INGENIC_D0:
                        c->isa_level &= ~MIPS_CPU_ISA_M32R2;
+
+                       /* FPU is not properly detected on JZ4760(B). */
+                       if (c->processor_id == 0x2ed0024f)
+                               c->options |= MIPS_CPU_FPU;
+
                        fallthrough;
 
                /*