From mboxrd@z Thu Jan 1 00:00:00 1970 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 DF44FC2BB47 for ; Tue, 9 Aug 2022 13:46:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F43C83EF2; Tue, 9 Aug 2022 15:46:45 +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="Ys3vv5zF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8916784A49; Tue, 9 Aug 2022 15:46:41 +0200 (CEST) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 2262C83C4B for ; Tue, 9 Aug 2022 15:46:38 +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-qt1-x82c.google.com with SMTP id s11so1769375qtx.6 for ; Tue, 09 Aug 2022 06:46:38 -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; bh=SARAtPAZ8shVnGwP+rMj/4C6225JG+6co0bucUmKUFY=; b=Ys3vv5zFsOaRA6yxn241s6/bTySdcdFh3xcxi0OIf0GFhScaoiFlhaZx+RMWUo8zjE ya2UbVPiQgIS9MXpEPQDF/fjqG92JoYxZvHlpF20no+WCEn+xctXoYYolweQqjwcb/x7 4eh0iMq4REWrR8JAY/IZUkK819ulERtmkyc9E= 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; bh=SARAtPAZ8shVnGwP+rMj/4C6225JG+6co0bucUmKUFY=; b=mHHD2eJGAZKJ7cDrsUbJDBcn29idL0CDpZdKpGINnSRWL3ilzgC8ihA1RYSIJmy1kh EJWlsJucVTmXlAdZok0TqbUiIAabsnVMITEUiiIl2MUd6EBcYGE13qG6v5eowtDjfs6o MO3rSMvrMCe05Odd/kPgX/YpmUfXg2kv16MZqyO90Y3b7/oAoB4WpUOQVqGke27J5Mba q8PGjATJPRZDYcnhLQgAbFTRLH/mkePmMTmzJySkkDD9zoS8m1/y/V2CYc9Bme6QxlGp VsVBwaCwq04oOyXNQfIIynMZu7dXkx8/7QyRvJjk5vZEbLGaTFvw5GtDh+QkSgUsp7EY iVOg== X-Gm-Message-State: ACgBeo2FKfBe84lnteC7sDnDpYqEqyp+mQ2Dj8uKN3EF47763iEaTSRo UpBKO5kaeWzhuhM+TML8cIEu+w== X-Google-Smtp-Source: AA6agR7bLbP1Sllgpuw3oivdhTuKtiKg5k2s/M7L4rtbSDLFeAYOO+C5wTrely7PZMSQRMyhJ+T8dw== X-Received: by 2002:a05:622a:178e:b0:33b:1ad8:a58e with SMTP id s14-20020a05622a178e00b0033b1ad8a58emr20131561qtk.454.1660052796758; Tue, 09 Aug 2022 06:46:36 -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 br30-20020a05620a461e00b006b962b6d628sm3216252qkb.79.2022.08.09.06.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 06:46:36 -0700 (PDT) Date: Tue, 9 Aug 2022 09:46:34 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Marek Vasut , Philip Oberfichtner , u-boot@lists.denx.de, Christoph Niedermaier , Stefano Babic , Marcel Ziswiler , Marek =?iso-8859-1?Q?Beh=FAn?= , Peng Fan , u-boot@dh-electronics.com Subject: Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Message-ID: <20220809134634.GV1146598@bill-the-cat> References: <20220809100703.3101047-1-pro@denx.de> <20220809100703.3101047-2-pro@denx.de> <20220809105813.aa4vjcyiqm3mnqx4@pali> <41f76858-38d9-284b-1b54-b511f3b3cd67@denx.de> <20220809112151.jhrytuxraqcahzh5@pali> <4c124a1f-28cb-a805-ac6f-fd50ae2ee00e@denx.de> <20220809113224.4mvygsubvtb5wd7a@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fB+mTLub+GgdDGIS" Content-Disposition: inline In-Reply-To: <20220809113224.4mvygsubvtb5wd7a@pali> 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 --fB+mTLub+GgdDGIS Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 09, 2022 at 01:32:24PM +0200, Pali Roh=E1r wrote: > On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote: > > On 8/9/22 13:21, Pali Roh=E1r wrote: > >=20 > > (reducing the CC list) > >=20 > > > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote: > > > > On 8/9/22 12:58, Pali Roh=E1r wrote: > > > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote: > > > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig. > > > > > ... > > > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > > > > > index 949ebb46ba..dde06bdd96 100644 > > > > > > --- a/arch/arm/Kconfig > > > > > > +++ b/arch/arm/Kconfig > > > > > > @@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD > > > > > > density. For ARM architectures that support Thumb2 this = flag will > > > > > > result in Thumb2 code generated by GCC. > > > > > > +config SYS_L2_PL310 > > > > > > + bool "ARM PL310 L2 cache controller" This needs a depends on !SYS_L2CACHE_OFF. > > > > > > + help > > > > > > + Enable support for ARM PL310 L2 cache controller in U-Boot > > > > > > config SYS_L2CACHE_OFF > > > > > > bool "L2cache off" > > > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/a= rm/mach-mvebu/include/mach/config.h > > > > > > index 4add0d9e10..0bba0a4cf9 100644 > > > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h > > > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h > > > > > > @@ -25,8 +25,6 @@ > > > > > > #define MV88F78X60 /* for the DDR training bin_hdr code */ > > > > > > #endif > > > > > > -#define CONFIG_SYS_L2_PL310 > > > > > > - > > > > > > #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE > > > > > > /* Needed for SPI NOR booting in SPL */ > > > > >=20 > > > > > This option is required for mvebu SoC and is not user (de)-select= able. > > > > > So please do not define it in each individual mvebu board. It wou= ld make > > > > > it harder to introduce a new mvebu board into U-Boot. Instead ena= ble it > > > > > for mvebu SoCs like it was before this change. It can be done e.g= =2E by > > > > > "select" Kconfig keyword in mvebu Kconfig file. > > > >=20 > > > > Should it rather be 'default y if MVEBU' in that new PL310 Kconfig = option ? > > >=20 > > > No, because this is just default value of this option and still allows > > > end-user to de-select this option. > > >=20 > > > "select" is IIRC the only way how to force Kconfig to always enable s= ome > > > symbol without any option for end-user to disable it. > > >=20 > > > At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could dec= ide > > > that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can > > > decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposi= te > > > direction). > >=20 > > So why should the user be unable to deselect L2CC support on MVEBU ? > > I can very well disable L2CC support on MX6 and the platform works with= out > > it just fine. Maybe the MVEBU needs to be fixed to support the same ins= tead > > ? >=20 > Well, I'm not sure, currently it is non-deselectable option. Maybe it is > a bug... but at least change which is doing kconfig conversion should > not change behavior. It's tricky to say when to "select" or just "default y if .." or "imply" a given option. It's not only a matter of "can you disable X and the system is functional" but "would you normally want to". There are certainly system bring-up cases and similar where you want to disable L2CC because you're tracking down something. But it's really a feature of the chip and expected to work and something we want enabled, and the scope of when it would be disabled is very very narrow. Looking back at the patch itself, the config.h files that enabled this are almost all a SoC-common file (ti_am335x_common.h should have been setting this I bet, something else for the TODO pile for me), so my thought is that it should be a select'd option, but if there's strong opinion that it's useful to make it easy to turn off when needed, imply'd instead by the various ARCH's in question instead. That said, thinking about the missing dependency I listed above, that's how to disable L2 when needed, so perhaps select SYS_L2_PL310 if !SYS_L2CACHE_OFF under the various ARCH's is the right way. --=20 Tom --fB+mTLub+GgdDGIS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLyZTYACgkQFHw5/5Y0 tyxvKgv+OBlQastewfn1HB/hGfRyniOrl1rEzwH8QvGzMxfVtbSlPUhdoFkHOHPs SY3i9vy5b6lDPiatFZZ/2712VVx1g/yI2g4bP0AGr42BbfXQLmnbiBAVSpypld/m Usq0/aWtKNI5DEkTEg/e3+OG8JWjYSkkAT/uOVo+pgzSH7W+++mSNhzaKFjGvTpP Q2QobifHpttsD+srf63gTPlIlSoLJg70j3lY/on/xdRBHxhvrWZ7q+O/zHLbJRuy 6hINglclkiMxZGTGX0CCMOi0z81k5RYidvYsukCsi6nKcrucyiFNjbvpLqC1F+s4 OHQlMJzs9TsWuMefRoZQ03Gdc0YSGEQX2uHw47r0olnYiGz5tNAsUgA/QYbTGEmK h8U534iL+siU+8A+kqBjI1XoG2f3/MPRGdBrFNdh9eQazEVf35S7e2TkBRw+lavs 9fy6jk0SITFyJzo2Re7Z043IC+ykQYxGt46CsaC31/6ESzL4eA/tsuzoeiouJu68 /74huh9P =2/N+ -----END PGP SIGNATURE----- --fB+mTLub+GgdDGIS--