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 15A28C43334 for ; Mon, 25 Jul 2022 22:00:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA94683FAE; Tue, 26 Jul 2022 00:00:20 +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="a1njFeiL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04ED58413F; Tue, 26 Jul 2022 00:00:19 +0200 (CEST) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (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 59B44810F6 for ; Tue, 26 Jul 2022 00:00:14 +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-xf2f.google.com with SMTP id i4so9421263qvv.7 for ; Mon, 25 Jul 2022 15:00:14 -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=Wrc/Za5x5G4vMFCSlEaKao9f62fXD75mEQzfI7ikPAE=; b=a1njFeiLnHy7gp2AGPoO518C+xrOqb5b+Mp5XjgHp9kWEiNl+pVdHXj2yYwxkCM10q ypceZl6xJZaCKKoMvGrxyflOv5D0ARAaufiIAKi0R3RU5JKIGKcAXh0fZblgrCexSELB bE0IKBNI7nUOdRFVlb3jQi6mg+qvxvWEngbus= 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=Wrc/Za5x5G4vMFCSlEaKao9f62fXD75mEQzfI7ikPAE=; b=TiaRV7fwlLR/igyl3/n290BfUR3jojjaQPcZsdql2SVC5T+PYW7naEQk1+AIgf8jcM vs2cDslBYUwlvBvbqpiboGNuFWPLvRE8lvrniz2pVbPuH7Ou9h0GCHS8VNA5G1iLg2X/ 4uV7S+1t+zGFaxOVUuGEdmVm5puY+lMGKwJ9OakK4SBN622hnHnV1GzgTMtjQMEoRjgW E+qGEh+G738X+MVE3bhRduExgaR/ueNV/aV/odFzmRCNx2+ykguFaluXXYAM4tYjG61E WaHTUtnaWP1Xf1nT8p1/t88qcOgQwr8Nxt9krx2Ajx3t+RI+Jmy61WE+qdka0IuZ+z8h FVpg== X-Gm-Message-State: AJIora99n1FDcEC0BfaiFwNdQyAXiLj5kK3vFIFKoKydWSxvPKLDVifI WIU60NNzeInvbiGsKhnK7DZcxg== X-Google-Smtp-Source: AGRyM1uchMc0ULE4R0homcR5LURIY1DjS+cxQVU/6MlHRqSLibYge+sNZrn+0YFACjWD+Iwg5FVcig== X-Received: by 2002:a05:6214:27cd:b0:474:3ab:100a with SMTP id ge13-20020a05621427cd00b0047403ab100amr12612901qvb.47.1658786413091; Mon, 25 Jul 2022 15:00:13 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id i2-20020ac84f42000000b0031edab8ae91sm8125332qtw.49.2022.07.25.15.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 15:00:11 -0700 (PDT) Date: Mon, 25 Jul 2022 18:00:09 -0400 From: Tom Rini To: Stefan Roese Cc: u-boot@lists.denx.de, cchavva@marvell.com, awilliams@marvell.com, sjg@chromium.org Subject: Re: [PATCH 0/7] Add support for cyclic function execution infrastruture Message-ID: <20220725220009.GG1146598@bill-the-cat> References: <20220525074019.946607-1-sr@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cGKLaTu9cQ+F5Uk8" Content-Disposition: inline In-Reply-To: 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 --cGKLaTu9cQ+F5Uk8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 25, 2022 at 10:39:11AM +0200, Stefan Roese wrote: > Hi Tom, >=20 > On 25.05.22 09:40, Stefan Roese wrote: > > This patchset adds the basic infrastructure to periodically execute > > code, e.g. all 100ms. Examples for such functions might be LED blinking > > etc. The functions that are hooked into this cyclic list should be > > small timewise as otherwise the execution of the other code that relies > > on a high frequent polling (e.g. UART rx char ready check) might be > > delayed too much. This patch also adds the Kconfig option > > CONFIG_CYCLIC_MAX_CPU_TIME_US, which configures the max allowed time > > for such a cyclic function. If it's execution time exceeds this time, > > this cyclic function will get removed from the cyclic list. > >=20 > > How is this cyclic functionality executed? > > This patchset integrates the main function responsible for calling all > > registered cyclic functions cyclic_run() into the common WATCHDOG_RESET > > macro. This guarantees that cyclic_run() is executed very often, which > > is necessary for the cyclic functions to get scheduled and executed at > > their configured periods. > >=20 > > This cyclic infrastructure will be used by a board specific function on > > the NIC23 MIPS Octeon board, which needs to check periodically, if a > > PCIe FLR has occurred. > >=20 > > Ideas how to continue: > > One idea is to rename WATCHDOG_RESET to something like SCHEDULE and > > move the watchdog_reset call into this cyclic infrastructure as well. > > Or to perhaps move the shell UART RX ready polling to a cyclic > > function. > >=20 > > It's also possible to extend the "cyclic" command, to support the > > creation of periodically executed shell commands (for testing etc). > >=20 > > Thanks, > > Stefan >=20 > Tom, did you find the time to take a look at this series? What are > you ideas / plans with it? I would very much like to get it merged > as one of it's pro's is, providing the base for bigger cleanups in > the current WATCHDOG_RESET mess in U-Boot at some time. Sorry, I had intended to chime in sooner. Conceptually, OK, lets see where this takes us. Implementation-wise, this fails to build on sandbox_spl and maybe others: https://source.denx.de/u-boot/u-boot/-/jobs/471828 --=20 Tom --cGKLaTu9cQ+F5Uk8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLfEmYACgkQFHw5/5Y0 tyx/NAwAjbN9EoqZDVYHmNccW8qR7Umub7GFBYQnhwKy4KCTkv4lHaLhyScSE9Zi z+Bm2Og8n/zbdTw4Va9QrrNd2oc3f/+5FrF2+po/+JLHyYhi/TTyeNHLdCprTclS Fh4qQCc2yKGC9W1zwIKhst7W4tDK3ItzZE8DbKe7ZxHUYUKr3DF1dGvcV2AV0QeI eOql0FYKiLne/8grqg/2xDIEFMdPdckwEaJfEpBDgOjbBtkGqxkGTJVdF31Zcrz+ 69x901uO+UMcVGaizNutvpKwb0Mjorg1GQQ52a9h+JWzItfD+v2ndJIbN9Sa5BGh 7vOZs/951gMCt1Lt7m0D+xbScTOmUj8MXt/uITOaxiZC/ttTW0UPdmXbd232l70S hBlSHia5DURCPJzTm+h2lMpPEcVlARCIZfX9G0gvhKC5yeBnExBmemFygsjPT9Lg vLxBsNN9J4rJHyWXiIpUq7XAJXc/dzL7lkoSSmQV/Y+iBeWowmg5Bvduiqc3Yriz v+0RVZDH =1ea8 -----END PGP SIGNATURE----- --cGKLaTu9cQ+F5Uk8--