public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de,
	Alexey Brodkin <alexey.brodkin@synopsys.com>,
	Anup Patel <anup.patel@wdc.com>,
	Atish Patra <atish.patra@wdc.com>, Bin Meng <bmeng.cn@gmail.com>,
	Leo <ycliang@andestech.com>, Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Rick Chen <rick@andestech.com>, Sean Anderson <seanga2@gmail.com>,
	Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH] Finish converting CONFIG_SYS_CACHELINE_SIZE to Kconfig
Date: Mon, 30 Aug 2021 22:51:28 -0400	[thread overview]
Message-ID: <20210831025128.GA858@bill-the-cat> (raw)
In-Reply-To: <42196c51c9d36df50634b3c5f05b87891b00d1bd.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4192 bytes --]

On Tue, Aug 31, 2021 at 04:12:21AM +0200, Daniel Schwierzeck wrote:
> Am Donnerstag, dem 26.08.2021 um 11:47 -0400 schrieb Tom Rini:
> > We move the SYS_CACHE_SHIFT_N options from arch/arm/Kconfig to
> > arch/Kconfig, and introduce SYS_CACHE_SHIFT_4 to provide a size of
> > 16.
> > Introduce select statements for other architectures based on current
> > usage.  For MIPS, we take the existing arch-specific symbol and
> > migrate
> > to the generic symbol.  This lets us remove a little bit of otherwise
> > unused code.
> > 
> > Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
> > Cc: Anup Patel <anup.patel@wdc.com>
> > Cc: Atish Patra <atish.patra@wdc.com>
> > Cc: Bin Meng <bmeng.cn@gmail.com>
> > Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> > Cc: Leo <ycliang@andestech.com>
> > Cc: Palmer Dabbelt <palmer@dabbelt.com>
> > Cc: Paul Walmsley <paul.walmsley@sifive.com>
> > Cc: Rick Chen <rick@andestech.com>
> > Cc: Sean Anderson <seanga2@gmail.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> > I'm Cc'ing a bunch of RISC-V folks since that's where I'm least
> > confident and just put it per-board for now.
> > ---
> >  arch/Kconfig                       | 25 +++++++++++++++++++++++++
> >  arch/arc/include/asm/cache.h       |  3 ---
> >  arch/arm/Kconfig                   | 15 ---------------
> >  arch/mips/Kconfig                  | 26 +++-----------------------
> >  arch/mips/include/asm/cache.h      | 12 +-----------
> >  arch/mips/mach-bmips/Kconfig       | 20 ++++++++++----------
> >  arch/mips/mach-mtmips/Kconfig      |  4 ++--
> >  arch/mips/mach-pic32/Kconfig       |  2 +-
> >  arch/powerpc/cpu/mpc83xx/Kconfig   |  6 ++++++
> >  arch/powerpc/cpu/mpc85xx/Kconfig   | 15 +++++++++++++++
> >  arch/powerpc/cpu/mpc8xx/Kconfig    |  2 ++
> >  arch/powerpc/include/asm/cache.h   |  7 -------
> >  arch/riscv/Kconfig                 |  2 ++
> >  arch/sandbox/include/asm/cache.h   |  1 -
> >  arch/x86/include/asm/cache.h       |  7 +------
> >  include/configs/M5208EVBE.h        |  1 -
> >  include/configs/M5235EVB.h         |  1 -
> >  include/configs/M5249EVB.h         |  1 -
> >  include/configs/M5253DEMO.h        |  1 -
> >  include/configs/M5272C3.h          |  1 -
> >  include/configs/M5275EVB.h         |  1 -
> >  include/configs/M5282EVB.h         |  1 -
> >  include/configs/M53017EVB.h        |  1 -
> >  include/configs/M5329EVB.h         |  1 -
> >  include/configs/M5373EVB.h         |  1 -
> >  include/configs/amcore.h           |  1 -
> >  include/configs/astro_mcf5373l.h   |  1 -
> >  include/configs/cobra5272.h        |  1 -
> >  include/configs/eb_cpu5282.h       |  1 -
> >  include/configs/mx7ulp_evk.h       |  2 --
> >  include/configs/rk3188_common.h    |  2 --
> >  include/configs/rk3368_common.h    |  2 --
> >  include/configs/sifive-unmatched.h |  2 --
> >  include/configs/sipeed-maix.h      |  1 -
> >  include/configs/stmark2.h          |  1 -
> >  35 files changed, 68 insertions(+), 103 deletions(-)
> > 
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index b6f9e177b645..25f4a15b19f9 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -7,6 +7,27 @@ config HAVE_ARCH_IOREMAP
> >  config NEEDS_MANUAL_RELOC
> >  	bool
> >  
> > +config SYS_CACHE_SHIFT_4
> > +	bool
> > +
> > +config SYS_CACHE_SHIFT_5
> > +	bool
> > +
> > +config SYS_CACHE_SHIFT_6
> > +	bool
> > +
> > +config SYS_CACHE_SHIFT_7
> > +	bool
> > +
> > +config SYS_CACHELINE_SIZE
> > +	int
> > +	default 128 if SYS_CACHE_SHIFT_7
> > +	default 64 if SYS_CACHE_SHIFT_6
> > +	default 32 if SYS_CACHE_SHIFT_5
> > +	default 16 if SYS_CACHE_SHIFT_4
> > +	# Fall-back for MIPS
> > +	default 32 if MIPS
> 
> can't we get rid of the SYS_ prefix? Also _CACHE_ is ambiguous,
> L1_CACHE_SHIFT_* and L1_CACHELINE_SIZE are possibly more suitable.
> Otherwise:

I don't see a problem to a follow-up renaming things for further
clarity (and using L1 in the name makes sense), but I am for now trying
to (as you've probably noticed) plow through the CONFIG backlog and get
everything migrated.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-08-31  2:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 15:47 [PATCH] Finish converting CONFIG_SYS_CACHELINE_SIZE to Kconfig Tom Rini
2021-08-27  0:20 ` Sean Anderson
     [not found] ` <HK0PR03MB2994E19CA2BD1DB01D5FB1B0C1CB9@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-08-30  2:45   ` Rick Chen
2021-08-31  2:12 ` Daniel Schwierzeck
2021-08-31  2:51   ` Tom Rini [this message]
2021-10-02 17:25     ` Palmer Dabbelt
2021-08-31 22:10 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210831025128.GA858@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=alexey.brodkin@synopsys.com \
    --cc=anup.patel@wdc.com \
    --cc=atish.patra@wdc.com \
    --cc=bmeng.cn@gmail.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rick@andestech.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox