diff mbox series

[4/4] MIPS: loongson64: fix FTLB configuration

Message ID 20211124101241.10196-5-huangpei@loongson.cn (mailing list archive)
State Superseded
Headers show
Series [1/4] MIPS: rework local_t operation on MIPS64 | expand

Commit Message

Huang Pei Nov. 24, 2021, 10:12 a.m. UTC
Commit "da1bd29742b1" ("MIPS: Loongson64: Probe CPU features via
CPUCFG") makes 'set_ftlb_enable' called under c->cputype unset,
which leaves FTLB disabled on BOTH 3A2000 and 3A3000

Fixes: da1bd29742b1 ("MIPS: Loongson64: Probe CPU features via CPUCFG")
Signed-off-by: Huang Pei <huangpei@loongson.cn>
---
 arch/mips/kernel/cpu-probe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sergey Shtylyov Nov. 24, 2021, 12:35 p.m. UTC | #1
On 24.11.2021 13:12, Huang Pei wrote:

> Commit "da1bd29742b1" ("MIPS: Loongson64: Probe CPU features via

    Sorry for more nitpicking... "" not needed around the SHA1 ID. Hadn't I 
told you it should look the same as in the Fixes: tag?

> CPUCFG") makes 'set_ftlb_enable' called under c->cputype unset,
> which leaves FTLB disabled on BOTH 3A2000 and 3A3000
> 
> Fixes: da1bd29742b1 ("MIPS: Loongson64: Probe CPU features via CPUCFG")
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
[...]

MBR, Sergey
diff mbox series

Patch

diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index ac0e2cfc6d57..24a529c6c4be 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1734,8 +1734,6 @@  static inline void decode_cpucfg(struct cpuinfo_mips *c)
 
 static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
 {
-	decode_configs(c);
-
 	/* All Loongson processors covered here define ExcCode 16 as GSExc. */
 	c->options |= MIPS_CPU_GSEXCEX;
 
@@ -1796,6 +1794,8 @@  static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
 		panic("Unknown Loongson Processor ID!");
 		break;
 	}
+
+	decode_configs(c);
 }
 #else
 static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu) { }