diff options
author | Paul Cercueil <paul@crapouillou.net> | 2019-05-08 00:17:55 +0200 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-05-10 01:39:27 +0200 |
commit | 8041edb5920902adc9b28f2fcd9ccce395434ead (patch) | |
tree | 4de1eb98bc34c11954423c7cd176023a68e70a07 /arch/mips | |
parent | MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled (diff) | |
download | linux-8041edb5920902adc9b28f2fcd9ccce395434ead.tar.xz linux-8041edb5920902adc9b28f2fcd9ccce395434ead.zip |
MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA
The config0 register in the Xburst CPUs with a processor ID of
PRID_COMP_INGENIC_D0 report themselves as MIPS32r2 compatible,
but they don't actually support this ISA.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: od@zcrc.me
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index d5e335e6846a..6126b77d5a62 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1973,6 +1973,14 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu) panic("Unknown Ingenic Processor ID!"); break; } + + /* + * The config0 register in the Xburst CPUs with a processor ID of + * PRID_COMP_INGENIC_D0 report themselves as MIPS32r2 compatible, + * but they don't actually support this ISA. + */ + if ((c->processor_id & PRID_COMP_MASK) == PRID_COMP_INGENIC_D0) + c->isa_level &= ~MIPS_CPU_ISA_M32R2; } static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu) |