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 301EDECAAD8 for ; Fri, 16 Sep 2022 21:48:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 572A38499D; Fri, 16 Sep 2022 23:48:55 +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="NRkxcO5b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 279BE849AA; Fri, 16 Sep 2022 23:48:53 +0200 (CEST) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 D25D4848DB for ; Fri, 16 Sep 2022 23:48:49 +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-qk1-x729.google.com with SMTP id c19so14853314qkm.7 for ; Fri, 16 Sep 2022 14:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=n3sI7QIS0iLJ5uKdESKmNeNiWPu7heSSqTuVmtMrfTI=; b=NRkxcO5bUn2OEfRYhlo/jpp6NIpJXH+auQabPmuFTYxSWqKpC9ABM46ru3uR2CjDwz OVjeI2ZZu80UV9/upQaFYM9a6bptlk88fm1GOp1mqNK/vxQ0LZ0/rVuwLp8EzhUBeSQ2 11oUUFBy7faJ7IEfVXqQsq26IoSbzDrvE1lCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=n3sI7QIS0iLJ5uKdESKmNeNiWPu7heSSqTuVmtMrfTI=; b=th9vRv3aBlYPigKrMoyec8vvuIX6W5UsSyJzk9OtZzfIsuTDz0Crpa+2LVFgvEkVpW xXbapaZW+ksv8to/ltGcvReR6xP5wlMy31Y/7EK0Xt78+PKJrfPEVfAETUFRmFToKpnb VfBU5jJAFkGmuKZO733MG88HL8sEG4NTcAv6X6VMKy//6jeuITKxGPQ/OBTPga5zUMc/ NhRRZDhGktEncANFCBGUig0o2ZddvHQgPjI3BmXLWDo5lZeguXtFzYqLhPO8rlIxuBK9 dA8akr3uSICktwud2F5t04aa8HSwG/Snleybg35M7CnEcX3E7xPaUdhZNCzOtq4FwJ1f 49tw== X-Gm-Message-State: ACrzQf0XX/oUx+1lGwpg1PRz3w9Kv0RUaH8nVcDbi77hjp7plLg4/7pI 1gcnKrMCoIp1257PdIJ0fsboK/21Dsq7YlUu X-Google-Smtp-Source: AMsMyM6I8ijbobDdZ03xbxuN+yMpUkMj2h4Zvx1c6rrFg5KLOt7aPE8Epj4jGuXcf9s0Kwq9OWPw+g== X-Received: by 2002:a05:620a:271b:b0:6cd:fd1f:7472 with SMTP id b27-20020a05620a271b00b006cdfd1f7472mr5615167qkp.142.1663364928385; Fri, 16 Sep 2022 14:48:48 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-9528-6343-1213-bf35.res6.spectrum.com. [2603:6081:7b00:6400:9528:6343:1213:bf35]) by smtp.gmail.com with ESMTPSA id y16-20020a05620a25d000b006bc0980db76sm6190078qko.126.2022.09.16.14.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 14:48:47 -0700 (PDT) Date: Fri, 16 Sep 2022 17:48:45 -0400 From: Tom Rini To: Stefan Roese Cc: U-Boot Mailing List Subject: Re: Please pull u-boot-watchdog/next Message-ID: <20220916214845.GQ6993@bill-the-cat> References: <20220916140851.GJ6993@bill-the-cat> <20220916142117.GK6993@bill-the-cat> <6114cb4d-c212-1f40-fc1d-71b839715d01@denx.de> <77d6d897-6523-a45b-bed8-da4f67fc98f2@denx.de> <20220916192205.GN6993@bill-the-cat> <4bbeb17b-640d-38d7-2a9e-752567154643@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DYCP9ZX4RRtQiwKl" Content-Disposition: inline In-Reply-To: <4bbeb17b-640d-38d7-2a9e-752567154643@denx.de> 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.6 at phobos.denx.de X-Virus-Status: Clean --DYCP9ZX4RRtQiwKl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 16, 2022 at 09:46:49PM +0200, Stefan Roese wrote: > Hi Tom, >=20 > On 16.09.22 21:22, Tom Rini wrote: > > On Fri, Sep 16, 2022 at 09:12:54PM +0200, Stefan Roese wrote: > > > Hi Tom, > > >=20 > > > On 16.09.22 16:37, Stefan Roese wrote: > > > > Hi Tom, > > > >=20 > > > > On 16.09.22 16:21, Tom Rini wrote: > > > > > On Fri, Sep 16, 2022 at 10:08:51AM -0400, Tom Rini wrote: > > > > > > On Fri, Sep 16, 2022 at 09:22:16AM +0200, Stefan Roese wrote: > > > > > >=20 > > > > > > > Hi Tom, > > > > > > >=20 > > > > > > > please pull the following watchdog related patches: > > > > > > >=20 > > > > > > > -------------------------------------------------------------= --- > > > > > > > - Migrate watchdog reset to cyclic infrastructure (Stefan) > > > > > > > -------------------------------------------------------------= --- > > > > > > >=20 > > > > > > > Here the Azure build, without any issues: > > > > > > >=20 > > > > > > > https://dev.azure.com/sr0718/u-boot/_build/results?buildId=3D= 260&view=3Dresults > > > > > > >=20 > > > > > > >=20 > > > > > > > Thanks, > > > > > > > Stefan > > > > > > >=20 > > > > > > > The following changes since commit > > > > > > > 6ec7207ab3c4dad098967fef5df75e25240fd852: > > > > > > >=20 > > > > > > > =A0=A0 Merge branch '2022-09-15-TI-platform-updates' into ne= xt (2022-09-15 > > > > > > > 17:02:52 -0400) > > > > > > >=20 > > > > > > > are available in the Git repository at: > > > > > > >=20 > > > > > > > =A0=A0 git@source.denx.de:u-boot/custodians/u-boot-watchdog.= git next > > > > > > >=20 > > > > > > > for you to fetch changes up to > > > > > > > 4bd01be23a9d0c2dbfaac0c196ead6a89824cbf8: > > > > > > >=20 > > > > > > > =A0=A0 watchdog: Further cleanup (2022-09-16 07:09:05 +0200) > > > > > > >=20 > > > > > > > -------------------------------------------------------------= --- > > > > > > > Stefan Roese (6): > > > > > > > =A0=A0=A0=A0=A0=A0 watchdog: Integrate watchdog triggering i= nto the > > > > > > > cyclic framework > > > > > > > =A0=A0=A0=A0=A0=A0 cyclic: Introduce schedule() function > > > > > > > =A0=A0=A0=A0=A0=A0 cyclic: Use schedule() instead of WATCHDO= G_RESET() > > > > > > > =A0=A0=A0=A0=A0=A0 watchdog: Get rid of ASSEMBLY hacks > > > > > > > =A0=A0=A0=A0=A0=A0 watchdog: Remove WATCHDOG_RESET macro > > > > > > > =A0=A0=A0=A0=A0=A0 watchdog: Further cleanup > > > > > >=20 > > > > > > Good bad news, I've got your first hardware failure report.=A0 = One of > > > > > > these three: > > > > > > cyclic: Use schedule() instead of WATCHDOG_RESET() > > > > > > cyclic: Introduce schedule() function > > > > > > watchdog: Integrate watchdog triggering into the cyclic framewo= rk > > > > > >=20 > > > > > > Causes am335x_evm to have no output in SPL and just hang. It, a= long with > > > > > > all of the other TI AM335x platforms have watchdog enabled in S= PL. I can > > > > > > also observe that the system watchdog is not triggering, so may= be we're > > > > > > stuck in some loop where that's being serviced still? > > > > > >=20 > > > > > > I suspect all the am335x boards are broken, so if you don't have > > > > > > something there you can test on let me know off-list and I'll g= et you > > > > > > access to my lab. > > > > > >=20 > > > > >=20 > > > > > I'll note that pine64_plus_defconfig is now also failing, but > > > > > interestingly dra7xx_evm_defconfig is passing. > > > >=20 > > > > Thanks for all your testing Tom. I'll check, if I still have an AM3= 55x > > > > here. I just now found an Cubieboard2, which also seems to have SPL > > > > watchdog enabled. Let me check, if I can get this board running and > > > > tested. > > >=20 > > > Cubieboard2 does not really use the watchdog in U-Boot and especially > > > not very early (SPL). So no help here. But I figured out a potential > > > problem that might explain you system hang. Could you please give the > > > attached patch a try and let me know, if this changes the situation > > > a bit? > > >=20 > > > Thanks, > > > Stefan > >=20 > > > From 3788aadff5d697e3e150a9e520915007f7a26def Mon Sep 17 00:00:00 20= 01 > > > From: Stefan Roese > > > Date: Fri, 16 Sep 2022 21:08:51 +0200 > > > Subject: [PATCH] cyclic: Only call cyclic_run() from schedule() when = it's > > > ready > > >=20 > > > schedule() might get called very early in the boot process (SPL etc), > > > when the cyclic IF is not initialized. Let's make sure, that we only > > > call into cyclic_run() when it's ready. > > >=20 > > > Signed-off-by: Stefan Roese > > > --- > > > common/cyclic.c | 7 ++++++- > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > >=20 > > > diff --git a/common/cyclic.c b/common/cyclic.c > > > index 594f9cd92592..9cdbed4ecc92 100644 > > > --- a/common/cyclic.c > > > +++ b/common/cyclic.c > > > @@ -104,7 +104,12 @@ void schedule(void) > > > if (IS_ENABLED(CONFIG_HW_WATCHDOG)) > > > hw_watchdog_reset(); > > > - cyclic_run(); > > > + /* > > > + * schedule() might get called very early before the cyclic IF is > > > + * ready. Make sure to only call cyclic_run() when it's initalized. > > > + */ > > > + if (gd->cyclic->cyclic_ready) > > > + cyclic_run(); > > > } > > > int cyclic_uninit(void) > >=20 > > No change. >=20 > Thanks for testing. I do have one last experiment for tonight. Please > give the attached v2 a try. >=20 > Thanks, > Stefan > From 2f61bc2cf011190eedbc0be34b4d61f342e7e5a5 Mon Sep 17 00:00:00 2001 > From: Stefan Roese > Date: Fri, 16 Sep 2022 21:08:51 +0200 > Subject: [PATCH v2] cyclic: Only call cyclic_run() from schedule() when i= t's > ready >=20 > schedule() might get called very early in the boot process (SPL etc), > when the cyclic IF is not initialized. Let's make sure, that we only > call into cyclic_run() when it's ready. >=20 > Signed-off-by: Stefan Roese > --- > common/cyclic.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/common/cyclic.c b/common/cyclic.c > index 594f9cd92592..b3c180bd1a62 100644 > --- a/common/cyclic.c > +++ b/common/cyclic.c > @@ -104,7 +104,12 @@ void schedule(void) > if (IS_ENABLED(CONFIG_HW_WATCHDOG)) > hw_watchdog_reset(); > =20 > - cyclic_run(); > + /* > + * schedule() might get called very early before the cyclic IF is > + * ready. Make sure to only call cyclic_run() when it's initalized. > + */ > + if (gd && gd->cyclic && gd->cyclic->cyclic_ready) > + cyclic_run(); > } > =20 > int cyclic_uninit(void) This worked and both boards that failed before now pass. --=20 Tom --DYCP9ZX4RRtQiwKl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMk7zEACgkQFHw5/5Y0 tyxwmgv/YR46x42VJ2+iU5e+0p7Tm/GjCrbw2wqvgUsb0Uq9KUs4vTS0RiFNgRTl 1PlZfys3Hqkyvg1naYAd4SsDKN4/XROATiTjJaM/vgcDE1jjNQQO9LA+NTlkFKoF o3ooWb2L1aNQlc2trSJVWmQ9vTEzGYu37B4FVMtTBmXuODsY86xmBBTG96FoRyRY ld3pFXk9BonHs7L4xZs6vc4hkBqmh4+oaFivFhoNxgKls86K5CvsVvoYf/0pfU6f BS0Q4hDt7UgoPyooaRLGA5TvBYP6YG4ujywiukA0NvHDuVPIqk1KvygK+yqCrCv7 dSPtiu5xhzZzNy5Uv2FH6/oiQJMMCwIXiArkHtCD2UGdzHtNqvGLHSXBbI7pNYWO O+iUy3GRQQHAN/NGfJpK7oQbwHJ2RlV1LT7sViitBDpS4ExBprfNJ67LSNLm2meT 02lvGo8l+4IqV30O9ZuxCwJ87rGR2ZWB8ZdzRRQ4P0SgMVzvklnYSZGPhMLpiRbJ v0wV8cGh =sYwp -----END PGP SIGNATURE----- --DYCP9ZX4RRtQiwKl--