Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp247414imn; Mon, 25 Jul 2022 15:22:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tCDfk3pefYxn3p7i/iDkicuHpKDdr0kLvJGgpEBrO0OHpG6MK/zicrAezD5dSXDsyssfQC X-Received: by 2002:a17:902:bd47:b0:16a:71a4:9bfd with SMTP id b7-20020a170902bd4700b0016a71a49bfdmr14447706plx.109.1658787751587; Mon, 25 Jul 2022 15:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658787751; cv=none; d=google.com; s=arc-20160816; b=hl2tuhG0oZnHn+m0u9enXkZjUEpyOPQSpBUB0Iv+HrpDC5I+LF8QPyv9NT0ah1oJ2S CTV9T5WJR9FkeoB8XBZJEzOp9owgPTXejMVhUBXzMijJ6y3Bebda/BEbi8jbPlT0MqP3 /DsLW4qHsDMmC2ksI8PQ3x9pPDorySa0wwHLFtPS2VsncqBbC89JIgAg9qsdJmpE3WGj gzP6ZC/83x1gy4GEP3GA+coZmvWdVXvYYqnCHDrr++dcb7wJa5gd7K5oY6Z/rjFc0HHT /EHjWab+5/JmervX9c8VTpro/SmQBqaNT6wYX/BOwQQ3sAC3XHV+P8v/hbLiDc/pBp1e 4uiw== 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=KOJobnu1ibyj/ZcG93fUUoLOHbRERwO9OnX4OkzLZxY=; b=jSUKcVTqcFu7RaWT+VtrQWOs1nmYsw8KtbRlMA1TV4nDMqlT8fWxa5rywc8XnD8X2k Aht+XRFEkC6ADFBSKl8hKNW4qiS4lpqrqIfw6+MQk8/tCL8xMt66N73BrBT2dj1gr7r2 /gKJijhMESVMgMdhCSaUrNumKI/SNxBWYIY3XKC/0hIoW3v5tR6swNN4O/2QSpTK8Wjy wBdz78PD66NIC8hueLpCOJ2/suD5btwqFqx+kuKeEHdFhJLt022nUoM3ESu0AX5wg8pI KqYyGGmvO6HcceHdegudWx5/V6y/DmmYPcGqiP7ZOw1j4kMf2FJIJgd4kctlCPJ5tkj9 d0og== 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 m11-20020a634c4b000000b003fe2bc67bbdsi15684374pgl.116.2022.07.25.15.22.16; Mon, 25 Jul 2022 15:22:31 -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 S236458AbiGYV4b (ORCPT + 99 others); Mon, 25 Jul 2022 17:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiGYV43 (ORCPT ); Mon, 25 Jul 2022 17:56:29 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0632DDF20 for ; Mon, 25 Jul 2022 14:56:28 -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 26PLsH2x002031; Mon, 25 Jul 2022 16:54:17 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 26PLsGqG002027; Mon, 25 Jul 2022 16:54:16 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 25 Jul 2022 16:54:16 -0500 From: Segher Boessenkool To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Christophe Leroy , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: Regression: Linux v5.15+ does not boot on Freescale P2020 Message-ID: <20220725215416.GV25951@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> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220725201009.gwuchzswcqaxntrk@pali> 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 Mon, Jul 25, 2022 at 10:10:09PM +0200, Pali Roh?r wrote: > On Monday 25 July 2022 16:20:49 Christophe Leroy wrote: > Now I did again clean test with same Debian 10 cross compiler. > > $ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git && cd linux > $ git checkout v5.15 > $ make mpc85xx_smp_defconfig ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnuspe- > $ make vmlinux ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnuspe- > $ cp -a vmlinux vmlinux.v5.15 > $ git revert 9401f4e46cf6965e23738f70e149172344a01eef > $ make vmlinux ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnuspe- > $ cp -a vmlinux vmlinux.revert > $ powerpc-linux-gnuspe-objdump -d vmlinux.revert > vmlinux.revert.dump > $ powerpc-linux-gnuspe-objdump -d vmlinux.v5.15 > vmlinux.v5.15.dump > $ diff -Naurp vmlinux.v5.15.dump vmlinux.revert.dump > > And there are: > > -c000c304: 7d 20 f8 29 lwarx r9,0,r31,1 > +c000c304: 7d 20 f8 28 lwarx r9,0,r31 > > I guess it must be reproducible this issue as I'm using regular > toolchain from distribution. The kernel had #define PPC_RAW_LWARX(t, a, b, eh) (0x7c000028 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | __PPC_EH(eh)) and #define PPC_LWARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LWARX(t, a, b, eh)) and #ifdef CONFIG_PPC64 #define __PPC_EH(eh) (((eh) & 0x1) << 0) #else #define __PPC_EH(eh) 0 #endif but Christophe's 9401f4e46cf6 changed -"1: " PPC_LWARX(%0,0,%2,1) "\n\ +"1: lwarx %0,0,%2,1\n\ no longer checking CONFIG_PPC64. That appears to be the bug. 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. Segher