Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp696621imn; Tue, 26 Jul 2022 07:04:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twvWv23dsr1SX4ZHFBp1hskpXfYUXYfO6N/EdbM7qU2a8l+p7Is68Zn7BqWjMkvbCFRJQ9 X-Received: by 2002:a17:90b:17ca:b0:1f2:df3d:593c with SMTP id me10-20020a17090b17ca00b001f2df3d593cmr6160299pjb.205.1658844285488; Tue, 26 Jul 2022 07:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658844285; cv=none; d=google.com; s=arc-20160816; b=eYr/9Qxzs11+xaogozZ8HHyC2EVytw0EZAfXKUaYdlIX8UTCJdCSKjWUhSNpuZTWT/ oSxOQmzYuUhwtQE4RTFekN2ZaiQE+JGt2J9N32bI8aapZwKRWuyJviTWETvHGH4g2Rnw OCl2YeQdGr2/spnLIfuL63LQRston8vJALbUa88cmojxQJWzkHSDMKm1pTesFdaZh25l Mv0QA8bNrqsL91hFnMLttOXFPfZVnZR/uZXsXrPC/n+y0Rbno/uyqV/oukVAvZo/qWht azArUdtw5rLBLtykWGj4THLdNSqx5nGBQkCjK8DXj7Vxpc836CGWN0+J3z7R/Y5ngM8E 0h2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aEMoD1Sdndvzp01oplIp3kp+GR8RnpNVLemJpSKpqsA=; b=blZE5wr3zOuyscDAfnH2X2r25hJwYnVwHESYAgmXxWqIs3Xyok6BrijGWCc9qFeaEM esloSIhKTPEbFbhO9njOrEDGmQYzjYc5jmDptKIxVOg9i8ZEsRCvhXcEKUK5Byzd16Pv vf6fLyF3piLuTufAU5LjMY5ALNlwCghquOnNzi1Lf6AhkRDBK5QVc7Avwtr1LeGbMd67 47UcggCefYDLZz4ruVE2p/VpiC1+rqBOArydO6e57lZiGUGTNAMYRn1Ik5EvKxS7+cV8 /az81mS5oSra7gLm29PoQoVjSA/MzuNAz7lTfbLBdhvuhLolrQMLVC2hHF+pqVxkBMPx qfqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a17090a591200b001ef7418a170si7641953pji.183.2022.07.26.07.04.21; Tue, 26 Jul 2022 07:04:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237981AbiGZNqd (ORCPT + 99 others); Tue, 26 Jul 2022 09:46:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233523AbiGZNq2 (ORCPT ); Tue, 26 Jul 2022 09:46:28 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BBCD02314D for ; Tue, 26 Jul 2022 06:46:25 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 26QDi6KA001944; Tue, 26 Jul 2022 08:44:06 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 26QDi53k001943; Tue, 26 Jul 2022 08:44:05 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 26 Jul 2022 08:44:05 -0500 From: Segher Boessenkool To: Arnd Bergmann Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: Regression: Linux v5.15+ does not boot on Freescale P2020 Message-ID: <20220726134405.GX25951@gate.crashing.org> References: <20220722090929.mwhmxxdd7yioxqpz@pali> <6b227478-73b8-2a97-1c78-89570d928739@csgroup.eu> <20220723150702.jecerkhxhy65dgww@pali> <875yjld2oe.fsf@mpe.ellerman.id.au> <20220725125256.cg6su4d2ageylvp6@pali> <20220725201009.gwuchzswcqaxntrk@pali> <20220725215416.GV25951@gate.crashing.org> <20220726083406.tcjvny6d2di6q7ar@pali> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 26, 2022 at 11:02:59AM +0200, Arnd Bergmann wrote: > On Tue, Jul 26, 2022 at 10:34 AM Pali Roh?r wrote: > > On Monday 25 July 2022 16:54:16 Segher Boessenkool wrote: > > > The EH field in larx insns is new since ISA 2.05, and some ISA 1.x cpu > > > implementations actually raise an illegal insn exception on EH=1. It > > > appears P2020 is one of those. > > > > P2020 has e500 cores. e500 cores uses ISA 2.03. So this may be reason. > > But in official Freescale/NXP documentation for e500 is documented that > > lwarx supports also eh=1. Maybe it is not really supported. > > https://www.nxp.com/files-static/32bit/doc/ref_manual/EREF_RM.pdf (page 562) (page 6-186) > > At least there is NOTE: > > Some older processors may treat EH=1 as an illegal instruction. And the architecture says Programming Note Warning: On some processors that comply with versions of the architecture that precede Version 2.00, executing a Load And Reserve instruction in which EH = 1 will cause the illegal instruction error handler to be invoked. > In commit d6ccb1f55ddf ("powerpc/85xx: Make sure lwarx hint isn't set on ppc32") > this was clarified to affect (all?) e500v1/v2, e500v1/v2 based chips will treat any reserved field being set in an opcode as illegal. while the architecture says Reserved fields in instructions are ignored by the processor. Whoops :-) We need fixes for processor implementation bugs all the time of course, but this is a massive *design* bug. I'm surprised this CPU still works as well as it does! Even the venerable PEM (last updated in 1997) shows the EH field as reserved, always treated as 0. > this one apparently > fixed it before, > but Christophe's commit effectively reverted that change. > > I think only the simple_spinlock.h file actually uses EH=1 That's right afaics. > and this is not > included in non-SMP kernels, so presumably the only affected machines were > the rare dual-core e500v2 ones (p2020, MPC8572, bsc9132), which would > explain why nobody noticed for the past 9 months. Also people using an SMP kernel on older cores should see the problem, no? Or is that patched out? Or does this use case never happen :-) Segher