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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63865C433F5 for ; Fri, 5 Nov 2021 19:17:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D0C6161052 for ; Fri, 5 Nov 2021 19:17:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0C6161052 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 39E40833E6; Fri, 5 Nov 2021 20:17:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="NnSSLMmh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3035683216; Fri, 5 Nov 2021 20:17:48 +0100 (CET) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 04EB18370A for ; Fri, 5 Nov 2021 20:17:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id bj27so8013991qkb.11 for ; Fri, 05 Nov 2021 12:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZmjnVk6ksh+y/B+zMItAg3UxvzcjSfjXdMRZu1ooaR0=; b=NnSSLMmhHd3i71upknmGmMoe82H89OdqRMQuEATcbSAUJedfsZb4gagQpmRd48cXV1 9Y/d/buyuAW5+mvDPAZp5zcWKSBBwdZ5rKQHAHR7Jqg2BW5R44i7z0y4tV+5b1VS5eL8 R4AvflLJ7TbXLp1NWVQ4ftrkAbLpbtj521Dvw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZmjnVk6ksh+y/B+zMItAg3UxvzcjSfjXdMRZu1ooaR0=; b=mORYLphKtgwfIFAyEQr28RUIafjJrAnJfstfY0E1sqYLYYSTSavOn0oCgq9aRTbjWL S9EveuimbCb8QXIdFAMcqx5AhtYyt/+y+1jrmHzDDknjhUY6eL9+407aIVh4OOJjOFdC m3QwTL3oPePekvFolZfAKlguLuXxrzx6wsTp9o6wHkBJn2RUw+/ZraAVSL49D+XQdpj+ DQ8xhvP3gi3YwAMGGq7uHxJ1X5lPkesJT3qMOMIXwGYFpymTA2m+hFtkkT9arZQNgp0k dYJ4fW6DAT0km7l/ewgzrCCoyfN1NhtwTMI/RZmqqBI0FBrmTpVUdLHvR9Weg4qFz0ko VcFg== X-Gm-Message-State: AOAM532m4+53GC4k1AeNpmvq19z+H040JudXXMQbqmI0UMpxsPgmPOwq xXTlRR1y7WeGmpp0mM9E1C3KnQ== X-Google-Smtp-Source: ABdhPJzw5TQm27y5OA+Gwe16xOee9j0b96Dsa2TDNEuPmLL5MqVkZsEvBspD+5q3YaVSOvyJndtVsg== X-Received: by 2002:a37:2f07:: with SMTP id v7mr48757606qkh.38.1636139858457; Fri, 05 Nov 2021 12:17:38 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-dcf7-3600-6b4c-294c.res6.spectrum.com. [2603:6081:7b01:cbda:dcf7:3600:6b4c:294c]) by smtp.gmail.com with ESMTPSA id o10sm6643716qtx.43.2021.11.05.12.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 12:17:37 -0700 (PDT) Date: Fri, 5 Nov 2021 15:17:35 -0400 From: Tom Rini To: Heinrich Schuchardt Cc: Samuel Holland , Andre Przywara , Stefan Roese , Harald Seiler , u-boot@lists.denx.de, Jagan Teki , Bin Meng , Sean Anderson , Simon Glass Subject: Re: [PATCH v3 0/6] Improved sysreset/watchdog uclass integration Message-ID: <20211105191735.GW24579@bill-the-cat> References: <20211104035516.28268-1-samuel@sholland.org> <70136684-120e-925c-3709-576885d4bd17@denx.de> <20211104231140.4e2ad7f5@slackpad.fritz.box> <20211105100419.617375a7@donnerap.cambridge.arm.com> <53ead8ab-bd0b-afff-b738-c92366080333@denx.de> <20211105142120.GS24579@bill-the-cat> <9562b6e2-73d1-09c6-5c1e-fcecade5d0fb@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1Hs3rtFFTPjSXOg+" Content-Disposition: inline In-Reply-To: <9562b6e2-73d1-09c6-5c1e-fcecade5d0fb@canonical.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --1Hs3rtFFTPjSXOg+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 05, 2021 at 07:37:02PM +0100, Heinrich Schuchardt wrote: > On 11/5/21 17:12, Simon Glass wrote: > > Hi, > >=20 > > On Fri, 5 Nov 2021 at 08:21, Tom Rini wrote: > > >=20 > > > On Fri, Nov 05, 2021 at 12:14:47PM +0100, Stefan Roese wrote: > > > > Hi Andre, > > > >=20 > > > > Added Tom to Cc. > > > >=20 > > > > On 05.11.21 11:04, Andre Przywara wrote: > > > > > On Thu, 4 Nov 2021 20:02:41 -0600 > > > > > Simon Glass wrote: > > > > >=20 > > > > > Hi, > > > > >=20 > > > > > > On Thu, 4 Nov 2021 at 19:22, Stefan Roese wrote: > > > > > > >=20 > > > > > > > Hi Andre, > > > > > > >=20 > > > > > > > On 05.11.21 00:11, Andre Przywara wrote: > > > > > > > > On Thu, 4 Nov 2021 11:37:57 +0100 > > > > > > > > Stefan Roese wrote: > > > > > > > >=20 > > > > > > > > Hi Stefan, > > > > > > > > > On 04.11.21 04:55, Samuel Holland wrote: > > > > > > > > > > This series hooks up the watchdog uclass to automatical= ly register > > > > > > > > > > watchdog devices for use with sysreset, doing a bit of = minor cleanup > > > > > > > > > > along the way. > > > > > > > > > >=20 > > > > > > > > > > The goal is for this to replace the sunxi board-level n= on-DM reset_cpu() > > > > > > > > > > function. I was surprised to find that the wdt_reboot d= river requires > > > > > > > > > > its own undocumented device tree node, which references= the watchdog > > > > > > > > > > device by phandle. This is problematic for us, because = sunxi-u-boot.dtsi > > > > > > > > > > file covers 20 different SoCs with varying watchdog nod= e phandle names. > > > > > > > > > > So it would have required adding a -u-boot.dtsi file fo= r each board. > > > > > > > > > >=20 > > > > > > > > > > Hooking things up automatically makes sense to me; this= is what Linux > > > > > > > > > > does. However, I put the code behind a new option to av= oid surprises for > > > > > > > > > > other platforms. > > > > > > > > > >=20 > > > > > > > > > > Changes in v3: > > > > > > > > > > - Move condition to wdt-uclass.c to fix build erro= rs. > > > > > > > > > > - Include watchdog name in error message. > > > > > > > > > >=20 > > > > > > > > > > Changes in v2: > > > > > > > > > > - Extend the "if SYSRESET" block to the end of the= file. > > > > > > > > > > - Also make gpio_reboot_probe function static. > > > > > > > > > > - Rebase on top of 492ee6b8d0e7 (now handle all wa= tchdogs). > > > > > > > > > > - Added patches 5-6 as an example of how the new o= ption will be used. > > > > > > > > > >=20 > > > > > > > > > > Samuel Holland (6): > > > > > > > > > > sysreset: Add uclass Kconfig dependency to drivers > > > > > > > > > > sysreset: Mark driver probe functions as static > > > > > > > > > > sysreset: watchdog: Move watchdog reference to pl= at data > > > > > > > > > > watchdog: Automatically register device with sysr= eset > > > > > > > > > > sunxi: Avoid duplicate reset_cpu with SYSRESET en= abled > > > > > > > > > > sunxi: Use sysreset framework for poweroff/reset > > > > > > > > > >=20 > > > > > > > > > > arch/arm/Kconfig | 3 +++ > > > > > > > > > > arch/arm/mach-sunxi/board.c | 2 ++ > > > > > > > > > > drivers/sysreset/Kconfig | 11 ++++++-- > > > > > > > > > > drivers/sysreset/sysreset_gpio.c | 2 +- > > > > > > > > > > drivers/sysreset/sysreset_resetctl.c | 2 +- > > > > > > > > > > drivers/sysreset/sysreset_syscon.c | 2 +- > > > > > > > > > > drivers/sysreset/sysreset_watchdog.c | 40 ++++++++= ++++++++++++++------ > > > > > > > > > > drivers/watchdog/wdt-uclass.c | 8 ++++++ > > > > > > > > > > include/sysreset.h | 10 +++++++ > > > > > > > > > > 9 files changed, 67 insertions(+), 13 deletions(-) > > > > > > > > >=20 > > > > > > > > > Applied to u-boot-marvell > > > > > > > >=20 > > > > > > > > Mmmh, why u-boot-marvell, > > > > > > >=20 > > > > > > > Because I'm handling watchdog related changed since a few yea= rs and we > > > > > > > did not create a specific subsystem repo for this and I'm usu= ally > > > > > > > using my "marvell" one for this. > > >=20 > > > And fwiw, there's a few other cases like this. If it's too confusing, > > > maybe we should just roll out a few more repositories, I think it's > > > easier to do that now than pre-gitlab? > > >=20 > > > > > > > > and why did this end up already in master? > > > > > > > > Isn't that material for the next merge window? After all th= is changes > > > > > > > > quite a bit, for a lot of boards, and I did not have a clos= er look at > > > > > > > > the sunxi parts yet. > > > > > > >=20 > > > > > > > I was hesitating also a bit. But since this patchset is on th= e list in > > > > > > > v1 since over 2 months now (2021-08-21) I thought it was "rea= dy" for > > > > > > > inclusion now. We are at -rc1 and I think we still have enoug= h time to > > > > > > > fix any resulting problems in this release cycle. > > > > >=20 > > > > > Why do we have the merge window then? This is clearly not a regre= ssion or > > > > > general fix. > > > >=20 > > > > AFAIU, we are a bit less strict here in U-Boot. Patches that were p= osted > > > > before the merge-window and skipped the review process (most likely > > > > because of lack of time) are often still integrated in the early rcX > > > > cycles. At least this is how I handle it usually. > > > >=20 > > > > Tom, is my understanding here correct? > > >=20 > > > Yes. We are not as strict as the kernel is about what can come in > > > between rc1 and rc2 (and to a certain degree, post rc2). I leave thi= ngs > > > up to the discretion of the custodians. People tend of have less time > > > to handle U-Boot changes than other stuff, so I try and be flexible in > > > picking things up. > > >=20 > > > > > > Yes I agree, that should be plenty of time for people to review= it. > > > > >=20 > > > > > Well, if there would be people to review the sunxi parts :-( > > > > > I am totally fine with the generic patches (as they have been rev= iewed), > > > > > but the sunxi integration is somewhat risky. > > > > > I was explicitly deprioritising that in my queue, as it really do= esn't > > > > > change, add or fix anything, it's mere refactoring, from the user= 's point > > > > > of view. > > > > >=20 > > > > > > > Do you see any specific issues? > > > > >=20 > > > > > Patch 6/6 changes the config for all 157 Allwinner boards, so I t= hink that > > > > > deserves at least some testing, *before* merging it. > > > >=20 > > > > I expect that Samuel did some testing. But still, I agree that it > > > > would be much better, if these patches - especially the Allwinner p= arts > > > > got more extensive testing. > > > >=20 > > > > > I will do as much testing now as possible, but I am not happy abo= ut that > > > > > situation. > > > >=20 > > > > Understood. Should we revert patch 6/6 for now? > > >=20 > > > FWIW, given Samuel has been doing a number of allwinner changes, I had > > > also assumed it was sufficiently tested, which is why I didn't raise a > > > further concern when I saw the widespread nature of the overall chang= es, > > > just figured it was a few more ready-to-go cleanups that weren't quite > > > picked up in time. Please do speak up if you want me to revert the l= ast > > > part. > >=20 > > Also it is often true that people find problems by testing on master > > so applying it helps to shake the tree a bit. > >=20 > > Regards, > > Simon > >=20 >=20 > We don't actually have a problem with this series but with a previous > watchdog patch. The culprit according to bisecting is: >=20 > b147bd3607f8 ("sunxi: Enable watchdog timer support by default") >=20 > When booting the OrangePi PC the watchdog triggers while Linux is booting, > ca. 16 s after leaving the UEFI subsystem. This matches WDT_MAX_TIMEOUT in > drivers/watchdog/sunxi_wdt.c. >=20 > If I run >=20 > =3D> wdt dev watchdog@1c20ca0 > =3D> wdt stop >=20 > before the bootefi command booting succeeds. >=20 > We don't disarm the watchdog and Linux does not do it for us in time. >=20 > The UEFI specification requires that the default watchdog reset time is 3= 00 > s. We should never arm the Sunxi hardware watchdog except within the > watchdog reset driver. >=20 > The solution is to disable CONFIG_WATCHDOG_AUTOSTART on SUNXI. See >=20 > [PATCH 1/1] watchdog: don't autostart watchdog on Sunxi boards > https://lists.denx.de/pipermail/u-boot/2021-November/466318.html This means we never did come up with a satisfactory to everyone solution to what UEFI thinks a watchdog should do, and what other types of deployment think a watchdog should do, yes? --=20 Tom --1Hs3rtFFTPjSXOg+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGFg0gACgkQFHw5/5Y0 tyzXXAv5AUixK+GaMo0AbkTyXj3E1fuhAYlhQHVH5gvMrtn4u1Wcr1tLAZuel5BO ykLgJPplU7rKmEmcoWZN7tSqfMhdJxV0H0oS4cDrktDVz3QN1skzfAvnQ8QO0dCX jkf1n6MA0ulDx+mTY4ZlWvcllkq73fl+rE+cDgPj92TRDdk7HOrrcpEn1lbdZiNl eGPH7G4XVeLxHrB46f3Kcu+igRzLsb2B+Du5iLpVReiqiav/lQLTgTlFSxBHP54+ mxVNjDxfaRYA3FSDM5QSnl43+WoeiLWBuZw+YnDCApX4bqNykPm3C+V6Yh+7tfgr SA48lLKAsdb6HG1Ip3NtCRrBq/7kDuSSyRqDUY9y7HKTB1DgrUnuXRSOyAZmuU1p XpYfALY3U03gCML9v1oozWVVYTBKmy4CIuh6YaW79qTMdDJGt+wN8fI3CQJHcdcJ VhUyn40LlW+fZ2jOBZkLLRKKzcK5FzaSHlqSqhyKd9ZaucAHI7VcgBFCkNPjZoKN of6wf6Xq =fckj -----END PGP SIGNATURE----- --1Hs3rtFFTPjSXOg+--