Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA
@ 2019-05-07 22:17 Paul Cercueil
  2019-05-09 23:52 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Cercueil @ 2019-05-07 22:17 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: od, linux-mips, linux-kernel, Paul Cercueil

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>
---

Notes:
    v2: Apply fix according to the PRID

 arch/mips/kernel/cpu-probe.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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)
-- 
2.21.0.593.g511ec345e18


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA
  2019-05-07 22:17 [PATCH v2] MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA Paul Cercueil
@ 2019-05-09 23:52 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-05-09 23:52 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Ralf Baechle, Paul Burton, James Hogan, od, linux-mips,
	linux-kernel, Paul Cercueil, linux-mips

Hello,

Paul Cercueil wrote:
> 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>

Applied to mips-next.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 22:17 [PATCH v2] MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA Paul Cercueil
2019-05-09 23:52 ` Paul Burton

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org linux-mips@archiver.kernel.org
	public-inbox-index linux-mips


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/ public-inbox