[PATCH] Finish converting CONFIG_SYS_CACHELINE_SIZE to Kconfig

Tom Rini trini at konsulko.com
Tue Aug 31 04:51:28 CEST 2021


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 at synopsys.com>
> > Cc: Anup Patel <anup.patel at wdc.com>
> > Cc: Atish Patra <atish.patra at wdc.com>
> > Cc: Bin Meng <bmeng.cn at gmail.com>
> > Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> > Cc: Leo <ycliang at andestech.com>
> > Cc: Palmer Dabbelt <palmer at dabbelt.com>
> > Cc: Paul Walmsley <paul.walmsley at sifive.com>
> > Cc: Rick Chen <rick at andestech.com>
> > Cc: Sean Anderson <seanga2 at gmail.com>
> > Cc: Simon Glass <sjg at chromium.org>
> > Signed-off-by: Tom Rini <trini at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210830/81888894/attachment.sig>


More information about the U-Boot mailing list