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 72034C3DA78 for ; Sun, 15 Jan 2023 22:04:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 447918533E; Sun, 15 Jan 2023 23:04:37 +0100 (CET) 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="Zb0N4j5C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2DDA85347; Sun, 15 Jan 2023 23:04:35 +0100 (CET) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 F023380FF4 for ; Sun, 15 Jan 2023 23:04:32 +0100 (CET) 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-qt1-x82f.google.com with SMTP id z9so731754qtv.5 for ; Sun, 15 Jan 2023 14:04:32 -0800 (PST) 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:message-id:reply-to; bh=4lESyQOXk/+B5KbYbrL1O7ncnA4pCLoWFNxW+jtIUUw=; b=Zb0N4j5CaApsnWa8lALxCI6FEQy1+dfDpXdNCN0Vo6PVFs+89UhisJh3+DNObRiiDk oygX9pljl4j0js6NDOZXBIe/V6k02Ljo0rDeJwlkVcIZpoqAvvspIrPxxdmUwbUsRENh DOLyqseBcKrXNzcdh6bntI7NrMsxRuIazu9vA= 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 :message-id:reply-to; bh=4lESyQOXk/+B5KbYbrL1O7ncnA4pCLoWFNxW+jtIUUw=; b=ElgMPwDRHZOj2p+iD2+uc1vjWq8235WZSX4GPKLz4dWdOHHDaBRWkoKrDN/lSpZEHW yrmOBsnOcEWf7qe6RvidKWvy3OWd1Vl+OZxnYi+1cbiYavYlFdKvpXGQ9CaXMOCBs4gc +8ioV/4FVlZmYOR/J+pIcEAVYPv6YZvRkDA+OCecu047p3Ch2KwpkGbkqunZLFCBUZiV vgBKQw819yCdmrwTKkIAP+7dYyWiGEQr+SSAVNiCiGcTXT3FXe32+NWxyneuvB8ke/aT cEDeORaBJGtSX8o2QsBaKc9WMiupfmRvS1zemEKXxlu8mI8z7KpicSLrcgFZoHQxNsB/ J5nA== X-Gm-Message-State: AFqh2kqaFIZA/1o3Yydqz7I4Nkw8/mDsPMakodRSrci30/Mt1yuNtj+C qLYp9TvpmG+nVh88D7QkehBzBw== X-Google-Smtp-Source: AMrXdXt1OjYt4B8feT+N5AN4EHszWF9Kc1AcI4vcPlIGeseimV9mn2qCroFx1d55VFJA8owowZzrsg== X-Received: by 2002:ac8:704b:0:b0:3a4:3137:79b3 with SMTP id y11-20020ac8704b000000b003a4313779b3mr121884022qtm.64.1673820271706; Sun, 15 Jan 2023 14:04:31 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-b529-26d0-5409-c87f.res6.spectrum.com. [2603:6081:7b00:6400:b529:26d0:5409:c87f]) by smtp.gmail.com with ESMTPSA id w26-20020a05620a0e9a00b006eeca296c00sm16865983qkm.104.2023.01.15.14.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 14:04:31 -0800 (PST) Date: Sun, 15 Jan 2023 17:04:29 -0500 From: Tom Rini To: Simon Glass Cc: u-boot@lists.denx.de, Oliver Graute , Francesco Dolcini Subject: Re: [PATCH 2/2] event: Correct dependencies on the EVENT framework Message-ID: <20230115220429.GM3880571@bill-the-cat> References: <20230114204936.3832739-1-trini@konsulko.com> <20230114204936.3832739-2-trini@konsulko.com> <20230115134545.GJ3880571@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zHDeOHGDnzKksZSU" 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 --zHDeOHGDnzKksZSU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 15, 2023 at 02:52:35PM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Sun, 15 Jan 2023 at 06:45, Tom Rini wrote: > > > > On Sat, Jan 14, 2023 at 06:31:05PM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Sat, 14 Jan 2023 at 13:49, Tom Rini wrote: > > > > > > > > The event framework is just that, a framework. Enabling it by itself > > > > does nothing, so we shouldn't ask the user about it. Reword (and co= rrect > > > > typos) around this the option and help text. This also applies to > > > > DM_EVENT, so reword as well. > > > > > > > > With this, it's time to address the larger problems. When functiona= lity > > > > uses events, typically via EVENT_SPY, the appropriate framework then > > > > must be select'd and NOT imply'd. As the functionality will cease to > > > > work (and so, platforms will fail to boot) this is non-optional and > > > > where select is appropriate. Audit the current users of EVENT_SPY to > > > > have a more fine-grained approach to select'ing the framework where > > > > used. > > > > > > > > Cc: Simon Glass > > > > Reported-by: Oliver Graute > > > > Reported-by: Francesco Dolcini > > > > Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use even= ts") > > > > Fixes: 42fdcebf859f ("event: Convert misc_init_f() to use events") > > > > Signed-off-by: Tom Rini > > > > --- > > > > arch/Kconfig | 6 +++--- > > > > arch/arm/Kconfig | 9 ++++----- > > > > arch/arm/mach-omap2/Kconfig | 3 +++ > > > > arch/mips/Kconfig | 2 +- > > > > arch/powerpc/cpu/mpc85xx/Kconfig | 1 + > > > > arch/x86/Kconfig | 1 + > > > > arch/x86/cpu/baytrail/Kconfig | 1 + > > > > arch/x86/cpu/broadwell/Kconfig | 1 + > > > > arch/x86/cpu/ivybridge/Kconfig | 1 + > > > > arch/x86/cpu/quark/Kconfig | 1 + > > > > board/google/Kconfig | 1 + > > > > board/keymile/Kconfig | 1 + > > > > boot/Kconfig | 1 + > > > > cmd/Kconfig | 1 + > > > > common/Kconfig | 17 ++++++++--------- > > > > drivers/core/Kconfig | 9 +++++---- > > > > drivers/cpu/Kconfig | 1 - > > > > > > Reviewed-by: Simon Glass > > > > > > Tested on chromebook-coral: > > > Tested-by: Simon Glass > > > > > > I am not quite sure what the effective difference is between select > > > and imply. Doesn't this suggest that there are some conflicting config > > > options? The only way imply would be disabled ( I thought) is if a > > > board does it explicitly? > > > > So there's two parts to it. As a framework, the option needs to be > > select'd, not implied. It doesn't make sense to disable the event > > framework and then wonder why VBE doesn't work. The next part however is > > > > Fixes: c5ef2025579e ("dm: fix DM_EVENT dependencies") >=20 > OK >=20 > > > > should have been part of it too. That commit turned all of the platforms > > which had imply DM_EVENT (and so from DM_EVENT, imply EVENT) in to > > depends on EVENT being set, and if it wasn't set (or select'd, only > > EFI_LOADER was select'ing it at the time) in to not enabling DM_EVENT, > > and since imply options can be off, no warnings were thrown by the build > > system. And since all of the non-dynamic EVENT stuff is linker-based, > > no binary size changes happened either. >=20 > So does this mean that select is 'forcing' the option to be enabled, > even if it conflicts with something else, or depends on something > which is not set? >=20 > I'd quite like to understand this better for the future. Could you > point to a board that was broken and now fixed, so I can have a fiddle > with it? While kernel centric at times (of course) https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-at= tributes covers things well, especially for the language itself. So yes, select forces the option to be enabled. If there's an unmet (depends on ...) dependency, then it will emit a warning to tell you as such. An example of a previously broken board would be apalis-imx8 as it does not enable EFI_LOADER so no DM_EVENT / EVENT and so: arch/arm/mach-imx/imx8/cpu.c:EVENT_SPY(EVT_DM_POST_INIT, imx8_init_mu); wasn't called and the platform would silently fail to boot. --=20 Tom --zHDeOHGDnzKksZSU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPEeGYACgkQFHw5/5Y0 tyxyuwv/XV2OllMw5LiveJhJGcOxkChOVUqcKNdFE4uvlQpLIQKkurn92DkoURBZ CsUpgyW00ap0ydHH8eEc40DvfLGbpYzHlHNENFcC0j1DRDWb39hgy3aelz2CvOmC 68dy+p6vwtl+BUercN3yCTYHMUGqcBN3CeRuBuIHqbpgIQREI4vD6j1Ldm5rxLoF 5ahQh4GqE2Y3SlumQDJvw/YCCHngPc3WpabtPhmns6g6Xk3lozzMd4Y3PnpdfyzE ZggIMcgXf+JLi4uMVjrjQDMNgES29Hl/IEuYNCNF4AWT9PdbbNKEGP/JKenlmnnl Gwbvnkg/t6vNrB2CnG6q3Jh7otDAIdSfo48Q33Ae1/5xHqrO2E25dq4x8afRSJA/ T006N6hLCiCvmyGXQPXkgq1ezBZs12cCxug9UQ+rffWSfGcGXS089mhydOTM3asX 5z7OxvOg2sxZUekA/9cib0HlEQdvFXn24hVoxnEg9EQZ0u9dBzpQN3Lo+vB4Jpzp vWhISkaA =iG44 -----END PGP SIGNATURE----- --zHDeOHGDnzKksZSU--