diff mbox

[5/6] powerpc/kconfig: Move cpu options after platform options

Message ID 1444338557-14988-5-git-send-email-mpe@ellerman.id.au (mailing list archive)
State Rejected
Headers show

Commit Message

Michael Ellerman Oct. 8, 2015, 9:09 p.m. UTC
In general platforms are a more important configuration decision than
cpus, so the platforms should come first.

My basis for saying that is that our cpu selection options are generally
just about tuning for a cpu, rather than enabling/disabling support for
a cpu. On the other hand disabling a platform means you can't boot on
those machines, and any associated cpu options should vanish.

With this applied the start of menuconfig looks like:

     [*] 64-bit kernel
         Endianness selection (Build little endian kernel)
         General setup
     [*] Enable loadable module support
     -*- Enable the block layer
         Platform support
         Processor support
         Kernel options
         Bus options

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thomas Huth Oct. 9, 2015, 5:47 a.m. UTC | #1
On 08/10/15 23:09, Michael Ellerman wrote:
> In general platforms are a more important configuration decision than
> cpus, so the platforms should come first.
> 
> My basis for saying that is that our cpu selection options are generally
> just about tuning for a cpu, rather than enabling/disabling support for
> a cpu. On the other hand disabling a platform means you can't boot on
> those machines, and any associated cpu options should vanish.
> 
> With this applied the start of menuconfig looks like:
> 
>      [*] 64-bit kernel
>          Endianness selection (Build little endian kernel)
>          General setup
>      [*] Enable loadable module support
>      -*- Enable the block layer
>          Platform support
>          Processor support
>          Kernel options
>          Bus options
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  arch/powerpc/Kconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index ea9377259f15..0f8c51279147 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -34,8 +34,6 @@ config CPU_LITTLE_ENDIAN
>  
>  endchoice
>  
> -source "arch/powerpc/platforms/Kconfig.cputype"
> -
>  config PPC32
>  	bool
>  	default y if !PPC64
> @@ -339,6 +337,7 @@ source "init/Kconfig"
>  source "kernel/Kconfig.freezer"
>  
>  source "arch/powerpc/platforms/Kconfig"
> +source "arch/powerpc/platforms/Kconfig.cputype"
>  
>  menu "Kernel options"
>  

Reviewed-by: Thomas Huth <thuth@redhat.com>
Scott Wood Oct. 12, 2015, 9:47 p.m. UTC | #2
On Fri, 2015-10-09 at 08:09 +1100, Michael Ellerman wrote:
> In general platforms are a more important configuration decision than
> cpus, so the platforms should come first.
> 
> My basis for saying that is that our cpu selection options are generally
> just about tuning for a cpu, rather than enabling/disabling support for
> a cpu. On the other hand disabling a platform means you can't boot on
> those machines, and any associated cpu options should vanish.

Kconfig.cputype *is* about enabling/disabling support for a cpu.  On 32-bit, 
the first choice is between "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx", 
"Freescale 85xx", "Freescale 8xx", "AMCC 40x", "AMCC 44x, 46x or 47x", or 
"Freescale e200".  Until that is set correctly, the platforms available for 
selection will not be correct.

Likewise, on 64-bit one must choose book3s versus book3e, before going on to 
the tuning selection you describe above.

-Scott
Michael Ellerman Oct. 13, 2015, 12:11 a.m. UTC | #3
On Mon, 2015-10-12 at 16:47 -0500, Scott Wood wrote:
> On Fri, 2015-10-09 at 08:09 +1100, Michael Ellerman wrote:
> > In general platforms are a more important configuration decision than
> > cpus, so the platforms should come first.
> > 
> > My basis for saying that is that our cpu selection options are generally
> > just about tuning for a cpu, rather than enabling/disabling support for
> > a cpu. On the other hand disabling a platform means you can't boot on
> > those machines, and any associated cpu options should vanish.
> 
> Kconfig.cputype *is* about enabling/disabling support for a cpu.  On 32-bit, 
> the first choice is between "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx", 
> "Freescale 85xx", "Freescale 8xx", "AMCC 40x", "AMCC 44x, 46x or 47x", or 
> "Freescale e200".  Until that is set correctly, the platforms available for 
> selection will not be correct.
> 
> Likewise, on 64-bit one must choose book3s versus book3e, before going on to 
> the tuning selection you describe above.

Ugh, this Kconfig mess shits me.

You're right, my testing was running menuconfig with an existing config, so
then the options look vaguely sane, but if you start with a blank config then
it's the wrong way around as you say.

So I'll drop this.

cheers
diff mbox

Patch

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ea9377259f15..0f8c51279147 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -34,8 +34,6 @@  config CPU_LITTLE_ENDIAN
 
 endchoice
 
-source "arch/powerpc/platforms/Kconfig.cputype"
-
 config PPC32
 	bool
 	default y if !PPC64
@@ -339,6 +337,7 @@  source "init/Kconfig"
 source "kernel/Kconfig.freezer"
 
 source "arch/powerpc/platforms/Kconfig"
+source "arch/powerpc/platforms/Kconfig.cputype"
 
 menu "Kernel options"