From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EF55C433ED for ; Wed, 28 Apr 2021 18:20:41 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C66B613FF for ; Wed, 28 Apr 2021 18:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C66B613FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FVn4Q2Rvsz30Bm for ; Thu, 29 Apr 2021 04:20:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=VtSyqB3U; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmx.net (client-ip=212.227.17.20; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=VtSyqB3U; dkim-atps=neutral X-Greylist: delayed 327 seconds by postgrey-1.36 at boromir; Thu, 29 Apr 2021 04:20:11 AEST Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FVn3v646vz2yQv for ; Thu, 29 Apr 2021 04:20:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619633997; bh=w2je6qGdiE6p/FITjA6Bavp5Ag6Uh9R3nmsWZFFhO28=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=VtSyqB3UuqoDI4rtmG66IoRl5nbRWG0d3UeyG/8OOxjNRZ/XKVZtIIGqHiJkSO/9Y 5989sg2fMhOG/WdzdhP5OOHOUSGtWHUix8z0mHoc2Y7lAPRXCRXWBkeaSEUZJMHSN0 m8RIynxpCDFNdiJFMl28pG2+ODm3Ab6xnkuK7tdw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.126]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mqb1c-1lFf9X0BlY-00mXgU; Wed, 28 Apr 2021 20:14:19 +0200 Date: Wed, 28 Apr 2021 20:14:16 +0200 From: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= To: Jordan Niethe Subject: Re: PPC32: Boot regression on Nintendo Wii, after create_branch rework in 5.8 Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S9LYVYxZq6odM2gc" Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1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v WoBcZWgzizAwQ2ShThrj3huNq7T18PTelvD51GwzIPS1p1EKbogi0RpS19t6KAn4e8r7/TM0c O/YFztrIduCvC+V8O8zMGDpNxl/+secHTGbrU4EulnWdy00nOumHMUp0Ttv5UI5qDFn/nE6Z7 0tDIKsEK8z4Ms8sSuhHOkKFWMQ/XC5n8l6kUsO0PVXY7xjc0CFUEqJ56Pt1/G0sWhZ4ZYuO91 JV3i/uBHiPRgfzhoQt7kijUCCtNu+hxXwuEHEaHjhD/qs25p+Uklg11eSPTIij4sCYUaj6uDo xpaxIKxZk60SMertXgjNUo4UJPUXKYcHIT/oJaTSye+nPB3zxHqxMODSgc4E/ZGd8fIGrsb+1 1DdPTC1/Q3tlcOUPKDx22lNBMLQPy88uayFcDb1GGmUOo2B4yylDy1eHWQCpOw5jhYd9ZxBr8 btJKm8GoQkZjnC4ge X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Emmanuel Gil Peyrot , linuxppc-dev , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Alistair Popple Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --S9LYVYxZq6odM2gc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Apr 28, 2021 at 11:33:24AM +1000, Jordan Niethe wrote: > On Mon, Apr 26, 2021 at 1:40 AM Jonathan Neusch=C3=A4fer > wrote: > > > > Hi, > > > > I recently booted my Wii again, and I noticed a regression at boot time. > > Output stops after the "Finalizing device tree... flat tree at 0xXXXXXX" > > message. I bisected it to this commit in the 5.8 development cycle: > > > > commit 7c95d8893fb55869882c9f68f4c94840dc43f18f > > Author: Jordan Niethe > > Date: Wed May 6 13:40:25 2020 +1000 > > > > powerpc: Change calling convention for create_branch() et. al. [...] > > Do you have any hints on how to debug and/or fix this issue? > Thanks for bisecting and reporting. > The "Finalizing device tree... flat tree at 0xXXXXXX" message comes > from the bootwrapper so if that is the last output it must be crashing > pretty early. > Commit 7c95d8893fb5 ("powerpc: Change calling convention for > create_branch() et. al.") made a change to machine_init() in > setup_32.c which seems like it might be a likely culprit for causing > early crashing. > The branch that is created and patched is just for optimization, so to > see if that is in fact the problem it might be worth trying to boot > with a patch like below >=20 > diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_3= 2.c > --- a/arch/powerpc/kernel/setup_32.c > +++ b/arch/powerpc/kernel/setup_32.c > @@ -87,9 +87,6 @@ notrace void __init machine_init(u64 dt_ptr) >=20 > patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_INST_= NOP)); >=20 > - create_cond_branch(&insn, addr, branch_target(addr), 0x820000); > - patch_instruction(addr, insn); /* replace b by bne cr0 */ > - > /* Do some early initialization based on the flat device tree */ > early_init_devtree(__va(dt_ptr)); This brings no improvement, unfortunately. The output is still: top of MEM2 @ 13F00000 zImage starting: loaded at 0x00b00000 (sp: 0x01145f90) Allocating 0xae3970 bytes for kernel... Decompressing (0x00000000 <- 0x00b11000:0x01143576)... Done! Decompressed 0xa65fdc bytes Linux/PowerPC load: root=3D/dev/mmcblk0p2 rootwait console=3Dusbgecko1 Finalizing device tree... flat tree at 0x11467a0 I'll probably dig deeper next weekend. Jonathan --S9LYVYxZq6odM2gc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEvHAHGBBjQPVy+qvDCDBEmo7zX9sFAmCJpfEACgkQCDBEmo7z X9vi5RAAssEWMPQ+7+kTUriFMcZtGNdKNBIrH4hQXbdipck1aGFHBrBOckP5C+wA zUyB2dn8ijxUuKImaUXk/7alkAB10cmwKgb5To2EPLVJOfCSqQIeaYPFD0YhKUON HXhx5mAAIKWGYo7BoufiU6Kbov0jRNy+ywYqiUJxJq5LbA+nlzRTaxabtW7YJMtk Y8a8xOSqkY7Q/1g/xH12QNH4eN6ZLRnFlQaWGhGkd/t0nirGPHoiXHySzzfW19Dy GSwFUk/XOS9dPemCcwkRTwAeWfOZZgED81JIIAnmw0rIAEGRA0CF2/7wxVKFhyu6 IJg1FHnsY/ECKxa6Ua+SZYfFKd8fNxSFTn91AfIf5+3rq638yGoiSE5DWaFB3V8K e+oAawX7fHb+Fe//7KKEYGilY/KNgSjrjocsSZVZD95pwxtq+jofDoYi9fZW3mGh KEHMloMuJGP/bDmX3AykBkM6JVMBvwcQco8/ZQa9i5Sc4m5/2VsRhL5UQ8gPBNho jCGQS4WrTiUvOOwumpRUwJtF765RueA0IirM50V3G5P5SydcTGvRfekZ5Rpl3Tys poT+wlrdnIHit+rjMIyljYnMl/+N44K/nvtQzFhViFrURNpxDF1ZVcEtLCwvOLZ/ FQNgkeVnZEM15px8Zfzyc5N86MRCepuChtmtMZj+N0lY42Gr1sU= =g46+ -----END PGP SIGNATURE----- --S9LYVYxZq6odM2gc--