Commit 6bc87964 authored by Paul Cercueil's avatar Paul Cercueil Committed by Zheng Zengkai
Browse files

MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B)

stable inclusion
from stable-5.10.51
commit 0903ac8f09c6ccbb2da16c38625b894c87c8d3ed
bugzilla: 175263 https://gitee.com/openeuler/kernel/issues/I4DT6F

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0903ac8f09c6ccbb2da16c38625b894c87c8d3ed



--------------------------------

[ Upstream commit fc52f92a ]

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: default avatarPaul Cercueil <paul@crapouillou.net>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b2db72d6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1827,6 +1827,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;

		/*