Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 127F6EB64D7 for ; Tue, 20 Jun 2023 15:17:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EAAA686116; Tue, 20 Jun 2023 17:17:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Gg1sVAti"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E7CCB86116; Tue, 20 Jun 2023 17:17:17 +0200 (CEST) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 529F084702 for ; Tue, 20 Jun 2023 17:17:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-630019ff99bso33045306d6.0 for ; Tue, 20 Jun 2023 08:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1687274234; x=1689866234; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1KGTdXLYDOX5+gTw+fGZsRTLTPgN7Bx97GWTMiwIa18=; b=Gg1sVAtinIq40DQLkop8Dm/mI8ZWSmdolJE/V49ni41mtNoFX9eZVZOFquoqj+DAJm PaYAWXUK/oUo+ElBc9q6MYw6ZdNfiDIwi4eif9MRNUwsN1yC9aMRLbJFOssD1Bq1gBhp ttfwE0OBF1sBSwfHLPZzt3EtsSClQtPbRRq3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687274234; x=1689866234; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1KGTdXLYDOX5+gTw+fGZsRTLTPgN7Bx97GWTMiwIa18=; b=VDtLtFe9Ucmoiz5sTck2b828++Iuh8EvJhTRFokVoTfDTpBEiEfdvBI1OlLr92ZUm7 xzpR80QVoRYa3rjbI9aZf1AkYI5zIXdzVaa7NAtntkNHOrstBF7TM/20BU+3L+Fz0J66 BHavV3ZfJyoY5/ySgDEAwe11d74+LQXMCFw3uW+uyaLwr7NtcizDG1yC2vFHGBgcASXG bmc6QxGiU2Lacm7iZ3PJfPCt8aeR/Xu6ajlaKvP32vO47V/pERn+R2Q8s0ULWyZqwAa5 iPPrHJkSAyuOjoq3myn2IW4LzljoJ152PKtGuwKCOQyomyBt+iwBo6VssqVujHul6Aii qy5w== X-Gm-Message-State: AC+VfDyDCjG4VK11pb7ylzq/PFDMJQuOw3+KI9NsnPqEuxzsSojvGq2p FFykxhPPysqkSeuyqH0NLgYGmJqlB7UZakBBtla9PQ== X-Google-Smtp-Source: ACHHUZ5YyJDc6b98eiHyPeze5cN3LlpcWa1bLOyTutVWaiC+zZTCGzNWO6ADX1UMrAMciDVi1m+NHw== X-Received: by 2002:a05:6214:500f:b0:62f:ebc4:89bd with SMTP id jo15-20020a056214500f00b0062febc489bdmr14411601qvb.63.1687274233983; Tue, 20 Jun 2023 08:17:13 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-388c-77eb-3c3c-0c17.res6.spectrum.com. [2603:6081:7b00:6400:388c:77eb:3c3c:c17]) by smtp.gmail.com with ESMTPSA id n11-20020a0cdc8b000000b0062de6537febsm1349376qvk.58.2023.06.20.08.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 08:17:13 -0700 (PDT) Date: Tue, 20 Jun 2023 11:17:11 -0400 From: Tom Rini To: Mario Kicherer Cc: u-boot@lists.denx.de Subject: Re: [PATCH] spl: spl_nor: use panic instead of hang if booting fails Message-ID: <20230620151711.GA3959654@bill-the-cat> References: <20230130100303.258229-1-dev@kicherer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kbUIkGj6PYiKAuiI" Content-Disposition: inline In-Reply-To: <20230130100303.258229-1-dev@kicherer.org> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --kbUIkGj6PYiKAuiI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 30, 2023 at 11:03:03AM +0100, Mario Kicherer wrote: > On systems without a watchdog, using hang() prevents a system to > recover from an error. For example, a board could implement a boot > counter to switch to an alternative load address after some failed > tries. >=20 > Signed-off-by: Mario Kicherer > --- > common/spl/spl.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/common/spl/spl.c b/common/spl/spl.c > index 2855cdd117..d1aa2fb8a9 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -822,11 +822,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2) > if (ret) { > if (CONFIG_IS_ENABLED(SHOW_ERRORS) && > CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)) > - printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=3D%d= )\n", > - ret); > + panic(SPL_TPL_PROMPT "failed to boot from all boot devices (err=3D%d)= \n", > + ret); > else > - puts(SPL_TPL_PROMPT "failed to boot from all boot devices\n"); > - hang(); > + panic_str(SPL_TPL_PROMPT "failed to boot from all boot devices\n"); > } > =20 > spl_perform_fixups(&spl_image); Not all platforms that use SPI in SPL have panic() (and related functions) available, so this introduces a number of fail to builds. --=20 Tom --kbUIkGj6PYiKAuiI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmSRwvUACgkQFHw5/5Y0 tyzX2gv8Cqs2jK9ioG4bCJiLe5IbIlnqKLutMJ/4j7+6LI3VvtiO/Ox7e/ZBHJZy LcIxTxPU4QDeT1Ulm53Tkf4jjkf+J2zSY8RRsVCO2v/gaTZLXf+oqo9eXGJBWIus lZky2ofACYLjLYU6TpYGIHy18+/qApcHqZdEdJwZlEvmsff5Wmhz5tpBs/ls1E85 /a8qM/FdQvBnS7va5p2RfTjseUc96P9uhGhqGUucjJfdo09N5AjoTuo5IRmo3IJC d60hlxR5k6c16f9yDbHRj5ynORUIrR86CZuUVqQd6hG1vi8bIuMKfK9zJHgGU0/H XESyJC0owxLRo7f4hsSl19iDX8MSVWguosSDOPxEPu6daoK6AqwJcI1ph2YgGVB7 silzPfydLoaN3QMUGpeZqvNgJE3nNWnuGK8OfvCkm5U32EKGyLe3GIDw0hCNyeUX 00gS/xNfAw5uM3gleXpDG5riKxTelH5Fb4utZSQDeSYmY+8XL7xQW8IoN6ggPqRO xoUkGdI7 =yyQD -----END PGP SIGNATURE----- --kbUIkGj6PYiKAuiI--