On Tue, Mar 18, 2025 at 08:32:10PM +0000, Alexey Brodkin wrote: > Hi Tom, > > > Currently we get a number of warnings about using "select" statements > > on "choice" options and that this as no effect. Rework some of these so > > that we use "depends on" rather than select for the CPU, and have the > > CPU select the MMU version. The MMU version is no longer prompted for. > > Thanks a lot for these fixes. > > I'm wondering though if these warnings only have started to appear recently, > i.e. how come we haven't notice them before?
They've always existed, it's just that you need to run a Kconfig linting tool to get them. We have one (which can be invoked two ways) and it's a bit verbose and notes many things as possible issues, rather than definitively something as an issue. > > Signed-off-by: Tom Rini <tr...@konsulko.com> > > --- > > Cc: Alexey Brodkin <alexey.brod...@synopsys.com> > > Cc: Eugeniy Paltsev <eugeniy.palt...@synopsys.com> > > Cc: uboot-snps-...@synopsys.com > > --- > > arch/arc/Kconfig | 22 ++++++---------------- > > 1 file changed, 6 insertions(+), 16 deletions(-) > > > > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > > index 6ae66bb163c0..be9774dc2896 100644 > > --- a/arch/arc/Kconfig > > +++ b/arch/arc/Kconfig > > @@ -66,28 +66,20 @@ config CPU_ARCHS38 > > > > endchoice > > > > -choice > > - prompt "MMU Version" > > - default ARC_MMU_V3 if CPU_ARC770D > > - default ARC_MMU_V2 if CPU_ARC750D > > - default ARC_MMU_ABSENT if CPU_ARCEM6 > > - default ARC_MMU_ABSENT if CPU_ARCHS36 > > - default ARC_MMU_V4 if CPU_ARCHS38 > > Well, here the idea was that some users may want to override > MMU settings for their particular SoC/design. See ARC cores are very > configurable and it's possible to mix and match certain components. > > For example, it's possible to start from a full-blown ARC770 and > deconfigure MMU from it, effectively getting something like ARC725, > but not exactly as some other properties of ARC770 will still be in place > as opposed to a true ARC725. > > Thus we used to have a "default" which comes with a particular template > (ARC770D for example) with ability to override it. > > > config ARC_MMU_ABSENT > > - bool "No MMU" > > + bool > > I thought that comment of these "bool" values will be seen in "menuconfig" GUI > helping a user to see what's that... > > [snip] > > > config ARC_MMU_VER > > int > > default 0 if ARC_MMU_ABSENT > > @@ -172,14 +162,14 @@ config TARGET_AXS103 > > > > config TARGET_EMSDP > > bool "Synopsys EM Software Development Platform" > > - select CPU_ARCEM6 > > + depends on CPU_ARCEM6 > > Here we had "select" because this particualr board (EM Software Development > Platform) > does come with ARC EM6 CPU, and so I though that selection of the board > enforces use > of the processor. But maybe I'm wrong here i nhow that's meant to be > implemented > properly. So, with more details on what the intention was I need to think harder about what to suggest as a fix. The good news at least is that for this patch, doing nothing won't change the behavior we have today. It might just be that we drop the select/imply statements, except for TARGET_EMSDP which requires thinking harder still, and expand the help texts. -- Tom
signature.asc
Description: PGP signature