Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4272090yba; Tue, 7 May 2019 15:21:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+47f0W9ZSXg5Q29RM4BZNiU8UZwyhJa1WxCv9L/Hk+PVFfxnqHN/gG++CGDHr+kUZWcvl X-Received: by 2002:a63:2b4c:: with SMTP id r73mr43865106pgr.181.1557267664128; Tue, 07 May 2019 15:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557267664; cv=none; d=google.com; s=arc-20160816; b=AOw8fYLcRvOY9PLyHsc/hM4zLYgz05Y4oomnlZ/WPHcVuWvdCRXcSNQXeHQH84sd/w T2S2r6T0khzzIwXQIMWkAsItKgHH+n5IE1QNz8FG+xKHamZ3VQDnXkZIwrYmZo6Ie/ye RHEPRkQB+/EN4wMaJONj3N8YuwTsNs8ut7M2XsFJ263P6U5J+Wx9Ci+98SrUe6eiT+lp SIZgAsXUzD9BkoA0ba3LnXyf7YjqyYYxaXosAYVm9plYRq3M+KbEz+LIK+37YZ2bYwuM jDNo5jMfSipfvTEKy9xmrIIAOdY7OrXJN8ZK4fq+XqizidFUCmvXSznRwh5ic/E4q7Ag oetg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KH3jCfJuzcTYKs4a3+eHRZa00RZObnheYuXmYtkiQnE=; b=DOItOEuuTkEq/t3riUupEloMQaiPur+MKhQr5rjxs24Fo6D1Wga22Q6jqf1C9bomSF ik6R1ery43Zo0TV6eWGq772I3Jop1QZ7oZOE6Rc5l9lRwT/ovasZgzbq9OVuGu3Qof2N S84ocv27lUjtPXiiggsFMkxhtYfGU8pxMyTMY5oTw/z7VmGJT21nfMHH8eLb6+rnJd6p jj6TfB8nJ9JXiugZdBoyMB7jRA9qSYXpem7/n4dGDpumZ8+RykgJ2HGJbUrHNdfZmRhg o+RUcZvHXn3iLjwEXKdqJqHHU3vVEQW/KDCTfHeWOoq36vp+6WRKIvVRw/VNRyIHIGws O9/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=HzyApLXt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch14si6301727plb.44.2019.05.07.15.20.48; Tue, 07 May 2019 15:21:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=HzyApLXt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfEGWSG (ORCPT + 99 others); Tue, 7 May 2019 18:18:06 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:33142 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbfEGWSG (ORCPT ); Tue, 7 May 2019 18:18:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1557267484; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=KH3jCfJuzcTYKs4a3+eHRZa00RZObnheYuXmYtkiQnE=; b=HzyApLXt1y6VWTnZv+m9zAarDjA8AqZ1pM/VaEqUHv/x39jfjlBWfh8I8EULo7tSDOtmxi q4L6ogTG5SMVuEtEYVJdzmhuDTdjl3JAydpLMl7V8BgNG7ep/TXKqmHsS8fmAaR6CNp6ew C9GEdjGGwjZsIeooLM6qtLFxjzJSfDw= From: Paul Cercueil To: Ralf Baechle , Paul Burton , James Hogan Cc: od@zcrc.me, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v2] MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA Date: Wed, 8 May 2019 00:17:55 +0200 Message-Id: <20190507221755.3396-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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