* [PATCH] MIPS: Loongson64: Correct TLB type for Loongson-3 Classic
@ 2020-04-30 16:48 Jiaxun Yang
2020-05-02 10:07 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Jiaxun Yang @ 2020-04-30 16:48 UTC (permalink / raw)
To: linux-mips; +Cc: chenhc, tsbogend, Jiaxun Yang
Huacai just informed me that some early Loongson-3A2000 had wrong
TLB type in Config0 register. That means we have to correct it via
PRID.
It looks like I shoudn't drop MIPS_CPU_FTLB flag in PRID case for
Loongson-3 Classic.
Fixes: da1bd29742b1 ("MIPS: Loongson64: Probe CPU features via CPUCFG")
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reported-by: Huacai Chen <chenhc@lemote.com>
---
arch/mips/kernel/cpu-probe.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 1736c173b242..ca2e6f1af4fe 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1999,8 +1999,11 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
* Loongson-3 Classic did not implement MIPS standard TLBINV
* but implemented TLBINVF and EHINV. As currently we're only
* using these two features, enable MIPS_CPU_TLBINV as well.
+ *
+ * Also some early Loongson-3A2000 had wrong TLB type in Config
+ * register, we correct it here.
*/
- c->options |= MIPS_CPU_TLBINV | MIPS_CPU_LDPTE;
+ c->options |= MIPS_CPU_FTLB | MIPS_CPU_TLBINV | MIPS_CPU_LDPTE;
c->writecombine = _CACHE_UNCACHED_ACCELERATED;
c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM |
MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2);
--
2.26.0.rc2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Loongson64: Correct TLB type for Loongson-3 Classic
2020-04-30 16:48 [PATCH] MIPS: Loongson64: Correct TLB type for Loongson-3 Classic Jiaxun Yang
@ 2020-05-02 10:07 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-02 10:07 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: linux-mips, chenhc
On Fri, May 01, 2020 at 12:48:02AM +0800, Jiaxun Yang wrote:
> Huacai just informed me that some early Loongson-3A2000 had wrong
> TLB type in Config0 register. That means we have to correct it via
> PRID.
>
> It looks like I shoudn't drop MIPS_CPU_FTLB flag in PRID case for
> Loongson-3 Classic.
>
> Fixes: da1bd29742b1 ("MIPS: Loongson64: Probe CPU features via CPUCFG")
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Reported-by: Huacai Chen <chenhc@lemote.com>
> ---
> arch/mips/kernel/cpu-probe.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-02 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30 16:48 [PATCH] MIPS: Loongson64: Correct TLB type for Loongson-3 Classic Jiaxun Yang
2020-05-02 10:07 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).