diff mbox series

powerpc/configs: Rename foo_basic_defconfig to foo_base.config

Message ID 20190528081614.26096-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 58b12eb28e34d3dd8a2d6743c26bf941ca1fbf37
Headers show
Series powerpc/configs: Rename foo_basic_defconfig to foo_base.config | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch next (8150a153c013aa2dd1ffae43370b89ac1347a7fb)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 38 lines checked

Commit Message

Michael Ellerman May 28, 2019, 8:16 a.m. UTC
We have several "defconfigs" that are not actually full defconfigs
they are just a base set of options which are then merged with other
fragments to produce a working defconfig.

The most obvious example is corenet_basic_defconfig which only
contains one symbol CONFIG_CORENET_GENERIC=y. But there is also
mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx.

To avoid confusion, rename these config fragments to "foo_base.config"
to make it clearer that they are not full defconfigs.

Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Makefile                                | 12 ++++++------
 .../{corenet_basic_defconfig => corenet_base.config} |  0
 .../{mpc85xx_basic_defconfig => mpc85xx_base.config} |  0
 .../{mpc86xx_basic_defconfig => mpc86xx_base.config} |  0
 4 files changed, 6 insertions(+), 6 deletions(-)
 rename arch/powerpc/configs/{corenet_basic_defconfig => corenet_base.config} (100%)
 rename arch/powerpc/configs/{mpc85xx_basic_defconfig => mpc85xx_base.config} (100%)
 rename arch/powerpc/configs/{mpc86xx_basic_defconfig => mpc86xx_base.config} (100%)

Comments

Christoph Hellwig May 28, 2019, 12:10 p.m. UTC | #1
On Tue, May 28, 2019 at 06:16:14PM +1000, Michael Ellerman wrote:
> We have several "defconfigs" that are not actually full defconfigs
> they are just a base set of options which are then merged with other
> fragments to produce a working defconfig.
> 
> The most obvious example is corenet_basic_defconfig which only
> contains one symbol CONFIG_CORENET_GENERIC=y. But there is also
> mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx.
> 
> To avoid confusion, rename these config fragments to "foo_base.config"
> to make it clearer that they are not full defconfigs.

Adding linux-kbuild, maybe we can make the handling of these fragments
generic and actually document it..

>
> Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  arch/powerpc/Makefile                                | 12 ++++++------
>  .../{corenet_basic_defconfig => corenet_base.config} |  0
>  .../{mpc85xx_basic_defconfig => mpc85xx_base.config} |  0
>  .../{mpc86xx_basic_defconfig => mpc86xx_base.config} |  0
>  4 files changed, 6 insertions(+), 6 deletions(-)
>  rename arch/powerpc/configs/{corenet_basic_defconfig => corenet_base.config} (100%)
>  rename arch/powerpc/configs/{mpc85xx_basic_defconfig => mpc85xx_base.config} (100%)
>  rename arch/powerpc/configs/{mpc86xx_basic_defconfig => mpc86xx_base.config} (100%)
> 
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index c345b79414a9..94f735db2229 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -333,32 +333,32 @@ PHONY += powernv_be_defconfig
>  
>  PHONY += mpc85xx_defconfig
>  mpc85xx_defconfig:
> -	$(call merge_into_defconfig,mpc85xx_basic_defconfig,\
> +	$(call merge_into_defconfig,mpc85xx_base.config,\
>  		85xx-32bit 85xx-hw fsl-emb-nonhw)
>  
>  PHONY += mpc85xx_smp_defconfig
>  mpc85xx_smp_defconfig:
> -	$(call merge_into_defconfig,mpc85xx_basic_defconfig,\
> +	$(call merge_into_defconfig,mpc85xx_base.config,\
>  		85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw)
>  
>  PHONY += corenet32_smp_defconfig
>  corenet32_smp_defconfig:
> -	$(call merge_into_defconfig,corenet_basic_defconfig,\
> +	$(call merge_into_defconfig,corenet_base.config,\
>  		85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa)
>  
>  PHONY += corenet64_smp_defconfig
>  corenet64_smp_defconfig:
> -	$(call merge_into_defconfig,corenet_basic_defconfig,\
> +	$(call merge_into_defconfig,corenet_base.config,\
>  		85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa)
>  
>  PHONY += mpc86xx_defconfig
>  mpc86xx_defconfig:
> -	$(call merge_into_defconfig,mpc86xx_basic_defconfig,\
> +	$(call merge_into_defconfig,mpc86xx_base.config,\
>  		86xx-hw fsl-emb-nonhw)
>  
>  PHONY += mpc86xx_smp_defconfig
>  mpc86xx_smp_defconfig:
> -	$(call merge_into_defconfig,mpc86xx_basic_defconfig,\
> +	$(call merge_into_defconfig,mpc86xx_base.config,\
>  		86xx-smp 86xx-hw fsl-emb-nonhw)
>  
>  PHONY += ppc32_allmodconfig
> diff --git a/arch/powerpc/configs/corenet_basic_defconfig b/arch/powerpc/configs/corenet_base.config
> similarity index 100%
> rename from arch/powerpc/configs/corenet_basic_defconfig
> rename to arch/powerpc/configs/corenet_base.config
> diff --git a/arch/powerpc/configs/mpc85xx_basic_defconfig b/arch/powerpc/configs/mpc85xx_base.config
> similarity index 100%
> rename from arch/powerpc/configs/mpc85xx_basic_defconfig
> rename to arch/powerpc/configs/mpc85xx_base.config
> diff --git a/arch/powerpc/configs/mpc86xx_basic_defconfig b/arch/powerpc/configs/mpc86xx_base.config
> similarity index 100%
> rename from arch/powerpc/configs/mpc86xx_basic_defconfig
> rename to arch/powerpc/configs/mpc86xx_base.config
> -- 
> 2.20.1
> 
---end quoted text---
Masahiro Yamada May 29, 2019, 1:02 a.m. UTC | #2
On Tue, May 28, 2019 at 9:10 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, May 28, 2019 at 06:16:14PM +1000, Michael Ellerman wrote:
> > We have several "defconfigs" that are not actually full defconfigs
> > they are just a base set of options which are then merged with other
> > fragments to produce a working defconfig.

The default values from Kconfig files are used
where CONFIG options are not specified by the defconfig.

So, I think corenet_basic_defconfig is a full defconfig
even if it contains a single CONFIG option.

Since the difference between "*_defconfig" and "*.config"
is ambiguous in some cases, it depends on the intended usage.


> > The most obvious example is corenet_basic_defconfig which only
> > contains one symbol CONFIG_CORENET_GENERIC=y. But there is also
> > mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx.
> >
> > To avoid confusion, rename these config fragments to "foo_base.config"
> > to make it clearer that they are not full defconfigs.
>
> Adding linux-kbuild, maybe we can make the handling of these fragments
> generic and actually document it..

I do not know how it should be documented.



> >
> > Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> > ---
> >  arch/powerpc/Makefile                                | 12 ++++++------
> >  .../{corenet_basic_defconfig => corenet_base.config} |  0
> >  .../{mpc85xx_basic_defconfig => mpc85xx_base.config} |  0
> >  .../{mpc86xx_basic_defconfig => mpc86xx_base.config} |  0
> >  4 files changed, 6 insertions(+), 6 deletions(-)
> >  rename arch/powerpc/configs/{corenet_basic_defconfig => corenet_base.config} (100%)
> >  rename arch/powerpc/configs/{mpc85xx_basic_defconfig => mpc85xx_base.config} (100%)
> >  rename arch/powerpc/configs/{mpc86xx_basic_defconfig => mpc86xx_base.config} (100%)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index c345b79414a9..94f735db2229 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -333,32 +333,32 @@ PHONY += powernv_be_defconfig
> >
> >  PHONY += mpc85xx_defconfig
> >  mpc85xx_defconfig:
> > -     $(call merge_into_defconfig,mpc85xx_basic_defconfig,\
> > +     $(call merge_into_defconfig,mpc85xx_base.config,\
> >               85xx-32bit 85xx-hw fsl-emb-nonhw)
> >
> >  PHONY += mpc85xx_smp_defconfig
> >  mpc85xx_smp_defconfig:
> > -     $(call merge_into_defconfig,mpc85xx_basic_defconfig,\
> > +     $(call merge_into_defconfig,mpc85xx_base.config,\
> >               85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw)
> >
> >  PHONY += corenet32_smp_defconfig
> >  corenet32_smp_defconfig:
> > -     $(call merge_into_defconfig,corenet_basic_defconfig,\
> > +     $(call merge_into_defconfig,corenet_base.config,\
> >               85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa)
> >
> >  PHONY += corenet64_smp_defconfig
> >  corenet64_smp_defconfig:
> > -     $(call merge_into_defconfig,corenet_basic_defconfig,\
> > +     $(call merge_into_defconfig,corenet_base.config,\
> >               85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa)
> >
> >  PHONY += mpc86xx_defconfig
> >  mpc86xx_defconfig:
> > -     $(call merge_into_defconfig,mpc86xx_basic_defconfig,\
> > +     $(call merge_into_defconfig,mpc86xx_base.config,\
> >               86xx-hw fsl-emb-nonhw)
> >
> >  PHONY += mpc86xx_smp_defconfig
> >  mpc86xx_smp_defconfig:
> > -     $(call merge_into_defconfig,mpc86xx_basic_defconfig,\
> > +     $(call merge_into_defconfig,mpc86xx_base.config,\
> >               86xx-smp 86xx-hw fsl-emb-nonhw)
> >
> >  PHONY += ppc32_allmodconfig
> > diff --git a/arch/powerpc/configs/corenet_basic_defconfig b/arch/powerpc/configs/corenet_base.config
> > similarity index 100%
> > rename from arch/powerpc/configs/corenet_basic_defconfig
> > rename to arch/powerpc/configs/corenet_base.config
> > diff --git a/arch/powerpc/configs/mpc85xx_basic_defconfig b/arch/powerpc/configs/mpc85xx_base.config
> > similarity index 100%
> > rename from arch/powerpc/configs/mpc85xx_basic_defconfig
> > rename to arch/powerpc/configs/mpc85xx_base.config
> > diff --git a/arch/powerpc/configs/mpc86xx_basic_defconfig b/arch/powerpc/configs/mpc86xx_base.config
> > similarity index 100%
> > rename from arch/powerpc/configs/mpc86xx_basic_defconfig
> > rename to arch/powerpc/configs/mpc86xx_base.config
> > --
> > 2.20.1
> >
> ---end quoted text---



--
Best Regards
Masahiro Yamada
Michael Ellerman May 29, 2019, 1:55 p.m. UTC | #3
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> On Tue, May 28, 2019 at 9:10 PM Christoph Hellwig <hch@infradead.org> wrote:
>>
>> On Tue, May 28, 2019 at 06:16:14PM +1000, Michael Ellerman wrote:
>> > We have several "defconfigs" that are not actually full defconfigs
>> > they are just a base set of options which are then merged with other
>> > fragments to produce a working defconfig.
>
> The default values from Kconfig files are used
> where CONFIG options are not specified by the defconfig.
>
> So, I think corenet_basic_defconfig is a full defconfig
> even if it contains a single CONFIG option.

That's technically true, but it's not a full defconfig in the sense that
it doesn't define a meaningful set of options for building for a
specific machine. In fact if you build it you get a .config that doesn't
include the one option it defines, CONFIG_CORENET_GENERIC=y.

> Since the difference between "*_defconfig" and "*.config"
> is ambiguous in some cases, it depends on the intended usage.

I'm pretty sure all the existing foo.config files are fragments that are
intended to be merged with an existing .config or other fragments.

ie:

These are fragments:
  arch/arm/configs/dram_0x00000000.config
  arch/arm/configs/dram_0xc0000000.config
  arch/arm/configs/dram_0xd0000000.config

These are all fragments:
  arch/powerpc/configs/be.config
  arch/powerpc/configs/book3s_32.config
  arch/powerpc/configs/altivec.config
  arch/powerpc/configs/85xx-hw.config
  arch/powerpc/configs/guest.config
  arch/powerpc/configs/85xx-smp.config
  arch/powerpc/configs/85xx-64bit.config
  arch/powerpc/configs/dpaa.config
  arch/powerpc/configs/85xx-32bit.config
  arch/powerpc/configs/fsl-emb-nonhw.config
  arch/powerpc/configs/86xx-smp.config
  arch/powerpc/configs/le.config
  arch/powerpc/configs/86xx-hw.config

Pretty sure these all are, they're used in gen_generic_defconfigs in arch/mips/Makefile:
  arch/mips/configs/generic/board-xilfpga.config
  arch/mips/configs/generic/board-ocelot.config
  arch/mips/configs/generic/board-ni169445.config
  arch/mips/configs/generic/32r6.config
  arch/mips/configs/generic/64r1.config
  arch/mips/configs/generic/32r1.config
  arch/mips/configs/generic/64r6.config
  arch/mips/configs/generic/eb.config
  arch/mips/configs/generic/micro32r2.config
  arch/mips/configs/generic/32r2.config
  arch/mips/configs/generic/board-boston.config
  arch/mips/configs/generic/el.config
  arch/mips/configs/generic/board-ranchu.config
  arch/mips/configs/generic/64r2.config
  arch/mips/configs/generic/board-sead-3.config

These are also both fragments:
  arch/x86/configs/tiny.config
  arch/x86/configs/xen.config


>> > The most obvious example is corenet_basic_defconfig which only
>> > contains one symbol CONFIG_CORENET_GENERIC=y. But there is also
>> > mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx.
>> >
>> > To avoid confusion, rename these config fragments to "foo_base.config"
>> > to make it clearer that they are not full defconfigs.
>>
>> Adding linux-kbuild, maybe we can make the handling of these fragments
>> generic and actually document it..
>
> I do not know how it should be documented.

Me either.

cheers
Michael Ellerman Oct. 30, 2019, 12:14 p.m. UTC | #4
On Tue, 2019-05-28 at 08:16:14 UTC, Michael Ellerman wrote:
> We have several "defconfigs" that are not actually full defconfigs
> they are just a base set of options which are then merged with other
> fragments to produce a working defconfig.
> 
> The most obvious example is corenet_basic_defconfig which only
> contains one symbol CONFIG_CORENET_GENERIC=y. But there is also
> mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx.
> 
> To avoid confusion, rename these config fragments to "foo_base.config"
> to make it clearer that they are not full defconfigs.
> 
> Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/58b12eb28e34d3dd8a2d6743c26bf941ca1fbf37

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index c345b79414a9..94f735db2229 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -333,32 +333,32 @@  PHONY += powernv_be_defconfig
 
 PHONY += mpc85xx_defconfig
 mpc85xx_defconfig:
-	$(call merge_into_defconfig,mpc85xx_basic_defconfig,\
+	$(call merge_into_defconfig,mpc85xx_base.config,\
 		85xx-32bit 85xx-hw fsl-emb-nonhw)
 
 PHONY += mpc85xx_smp_defconfig
 mpc85xx_smp_defconfig:
-	$(call merge_into_defconfig,mpc85xx_basic_defconfig,\
+	$(call merge_into_defconfig,mpc85xx_base.config,\
 		85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw)
 
 PHONY += corenet32_smp_defconfig
 corenet32_smp_defconfig:
-	$(call merge_into_defconfig,corenet_basic_defconfig,\
+	$(call merge_into_defconfig,corenet_base.config,\
 		85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa)
 
 PHONY += corenet64_smp_defconfig
 corenet64_smp_defconfig:
-	$(call merge_into_defconfig,corenet_basic_defconfig,\
+	$(call merge_into_defconfig,corenet_base.config,\
 		85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa)
 
 PHONY += mpc86xx_defconfig
 mpc86xx_defconfig:
-	$(call merge_into_defconfig,mpc86xx_basic_defconfig,\
+	$(call merge_into_defconfig,mpc86xx_base.config,\
 		86xx-hw fsl-emb-nonhw)
 
 PHONY += mpc86xx_smp_defconfig
 mpc86xx_smp_defconfig:
-	$(call merge_into_defconfig,mpc86xx_basic_defconfig,\
+	$(call merge_into_defconfig,mpc86xx_base.config,\
 		86xx-smp 86xx-hw fsl-emb-nonhw)
 
 PHONY += ppc32_allmodconfig
diff --git a/arch/powerpc/configs/corenet_basic_defconfig b/arch/powerpc/configs/corenet_base.config
similarity index 100%
rename from arch/powerpc/configs/corenet_basic_defconfig
rename to arch/powerpc/configs/corenet_base.config
diff --git a/arch/powerpc/configs/mpc85xx_basic_defconfig b/arch/powerpc/configs/mpc85xx_base.config
similarity index 100%
rename from arch/powerpc/configs/mpc85xx_basic_defconfig
rename to arch/powerpc/configs/mpc85xx_base.config
diff --git a/arch/powerpc/configs/mpc86xx_basic_defconfig b/arch/powerpc/configs/mpc86xx_base.config
similarity index 100%
rename from arch/powerpc/configs/mpc86xx_basic_defconfig
rename to arch/powerpc/configs/mpc86xx_base.config