CPU selection Kconfig cleanup, take 7
Subsystems (7)
cover CPU selection Kconfig cleanup, take 7
One of these days, I hope to get the patches in ;-)
No changes since the last version I sent for 2.6.23, aside from making the patch apply cleanly to for-2.6.24.
Paul, please apply the first two patches, as well as the remaining two if Kumar agrees.
Arnd <><
PATCH 1/4 autoselect optimal -mcpu= flag by platform
We can choose the -mcpu= gcc flags for compiling the kernel based on the platform that we build for. In case of multiplatform kernels, this chooses a setting for a common subset.
When using a platform type that can use different CPUs, a new option CONFIG_PPC_CPU_SELECTION can be enabled to select more specifically which CPUs the kernel will be able to run on.
This replaces the CONFIG_POWER4_ONLY option with an much more generic approach.
Also, when CONFIG_PPC_CPU_SELECTION is set, it is now possible to select a CPU to tune for by means of the -mtune= option.
I tried to be very careful when coding the specific rules into the Kconfig language, but it would be good to have a few people sanity-checking them.
arch/powerpc/platforms/52xx/Kconfig +2 -0
@@ -25,12 +25,14 @@ config PPC_EFIKA select RTAS_PROC select PPC_MPC52xx select PPC_NATIVE + select CPU_603e default n config PPC_LITE5200 bool "Freescale Lite5200 Eval Board" depends on PPC_MULTIPLATFORM && PPC32 select PPC_MPC5200 + select CPU_603e default n
arch/powerpc/platforms/82xx/Kconfig +1 -0
@@ -10,6 +10,7 @@ config MPC82xx_ADS select 8272 select 8260 select FSL_SOC + select CPU_603e help This option enables support for the MPC8272 ADS board
arch/powerpc/platforms/83xx/Kconfig +6 -0
@@ -6,6 +6,7 @@ choice config MPC8313_RDB bool "Freescale MPC8313 RDB" select DEFAULT_UIMAGE + select CPU_603e help This option enables support for the MPC8313 RDB board.
@@ -13,6 +14,7 @@ config MPC832x_MDS bool "Freescale MPC832x MDS" select DEFAULT_UIMAGE select QUICC_ENGINE + select CPU_603e help This option enables support for the MPC832x MDS evaluation board.
@@ -20,12 +22,14 @@ config MPC832x_RDB bool "Freescale MPC832x RDB" select DEFAULT_UIMAGE select QUICC_ENGINE + select CPU_603e help This option enables support for the MPC8323 RDB board. config MPC834x_MDS bool "Freescale MPC834x MDS" select DEFAULT_UIMAGE + select CPU_603e help This option enables support for the MPC 834x MDS evaluation board.
@@ -37,6 +41,7 @@ config MPC834x_MDS config MPC834x_ITX bool "Freescale MPC834x ITX" select DEFAULT_UIMAGE + select CPU_603e help This option enables support for the MPC 834x ITX evaluation board.
@@ -47,6 +52,7 @@ config MPC836x_MDS bool "Freescale MPC836x MDS" select DEFAULT_UIMAGE select QUICC_ENGINE + select CPU_603e help This option enables support for the MPC836x MDS Processor Board.
arch/powerpc/platforms/86xx/Kconfig +1 -0
@@ -8,6 +8,7 @@ config MPC8641_HPCN select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 + select CPU_7450 help This option enables support for the MPC8641 HPCN board.
arch/powerpc/platforms/Kconfig.cputype +345 -7
359 lines not on this page · raw message
arch/powerpc/platforms/cell/Kconfig +1 -0
@@ -20,6 +20,7 @@ config PPC_IBM_CELL_BLADE select MMIO_NVRAM select PPC_UDBG_16550 select UDBG_RTAS_CONSOLE + select CPU_CELL menu "Cell Broadband Engine options" depends on PPC_CELL
arch/powerpc/platforms/celleb/Kconfig +1 -0
@@ -2,6 +2,7 @@ config PPC_CELLEB bool "Toshiba's Cell Reference Set 'Celleb' Architecture" depends on PPC_MULTIPLATFORM && PPC64 select PPC_CELL + select CPU_CELL select PPC_OF_PLATFORM_PCI select HAS_TXX9_SERIAL select PPC_UDBG_BEAT
arch/powerpc/platforms/embedded6xx/Kconfig +4 -0
@@ -8,6 +8,7 @@ config LINKSTATION select FSL_SOC select PPC_UDBG_16550 if SERIAL_8250 select DEFAULT_UIMAGE + select CPU_603e help Select LINKSTATION if configuring for one of PPC- (MPC8241) based NAS systems from Buffalo Technology. So far only
@@ -20,6 +21,7 @@ config MPC7448HPC2 select TSI108_BRIDGE select DEFAULT_UIMAGE select PPC_UDBG_16550 + select CPU_7450 help Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) platform
@@ -29,6 +31,7 @@ config PPC_HOLLY select TSI108_BRIDGE select PPC_UDBG_16550 select WANT_DEVICE_TREE + select CPU_750 help Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval Board with TSI108/9 bridge (Hickory/Holly)
@@ -38,6 +41,7 @@ config PPC_PRPMC2800 select MV64X60 select NOT_COHERENT_CACHE select WANT_DEVICE_TREE + select CPU_7450 help This option enables support for the Motorola PrPMC2800 board endchoice
arch/powerpc/platforms/maple/Kconfig +1 -0
@@ -11,6 +11,7 @@ config PPC_MAPLE select PPC_RTAS select MMIO_NVRAM select ATA_NONSTANDARD if ATA + select CPU_970 default n help This option enables support for the Maple 970FX Evaluation Board.
arch/powerpc/platforms/pasemi/Kconfig +1 -0
@@ -2,6 +2,7 @@ config PPC_PASEMI depends on PPC_MULTIPLATFORM && PPC64 bool "PA Semi SoC-based platforms" default n + select CPU_PA6T select MPIC select PPC_UDBG_16550 select PPC_NATIVE
arch/powerpc/platforms/powermac/Kconfig +1 -0
@@ -16,6 +16,7 @@ config PPC_PMAC64 select MPIC_U3_HT_IRQS select GENERIC_TBSYNC select PPC_970_NAP + select CPU_970 default y
arch/powerpc/platforms/ps3/Kconfig +1 -0
@@ -2,6 +2,7 @@ config PPC_PS3 bool "Sony PS3" depends on PPC_MULTIPLATFORM && PPC64 select PPC_CELL + select CPU_CELL select USB_ARCH_HAS_OHCI select USB_OHCI_LITTLE_ENDIAN select USB_OHCI_BIG_ENDIAN_MMIO
arch/powerpc/Makefile +7 -12
@@ -74,24 +74,23 @@ CPP = $(CC) -E $(CFLAGS) CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ +OPTFLAGS := $(call cc-option,$(CONFIG_PPC_MCPU)) $(call cc-option,$(CONFIG_PPC_MTUNE)) + +# compilers older than 4.0.0 can only set -maltivec in 64 bit mode +# when compiling for 970 ifeq ($(CONFIG_PPC64),y) GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) - ifeq ($(CONFIG_POWER4_ONLY),y) ifeq ($(CONFIG_ALTIVEC),y) ifeq ($(GCC_BROKEN_VEC),y) - CFLAGS += $(call cc-option,-mcpu=970) -else - CFLAGS += $(call cc-option,-mcpu=power4) + OPTFLAGS := $(call cc-option,-mcpu=970) $(call cc-option,$(CONFIG_PPC_MTUNE)) endif -else - CFLAGS += $(call cc-option,-mcpu=power4) endif -else - CFLAGS += $(call cc-option,-mtune=power4) endif endif +CFLAGS += $(OPTFLAGS) + # No AltiVec instruction when building kernel CFLAGS += $(call cc-option,-mno-altivec)
@@ -103,10 +102,6 @@ CFLAGS += $(call cc-option,-funit-at-a-t # often slow when they are implemented at all CFLAGS += -mno-string -ifeq ($(CONFIG_6xx),y) -CFLAGS += -mcpu=powerpc -endif - cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
arch/powerpc/platforms/85xx/Kconfig +5 -0
@@ -6,12 +6,14 @@ choice config MPC8540_ADS bool "Freescale MPC8540 ADS" select DEFAULT_UIMAGE + select CPU_8540 help This option enables support for the MPC 8540 ADS board config MPC8560_ADS bool "Freescale MPC8560 ADS" select DEFAULT_UIMAGE + select CPU_8548 help This option enables support for the MPC 8560 ADS board
@@ -19,6 +21,7 @@ config MPC85xx_CDS bool "Freescale MPC85xx CDS" select DEFAULT_UIMAGE select PPC_I8259 + select CPU_8548 help This option enables support for the MPC85xx CDS board
@@ -26,6 +29,7 @@ config MPC85xx_MDS bool "Freescale MPC85xx MDS" select DEFAULT_UIMAGE # select QUICC_ENGINE + select CPU_8548 help This option enables support for the MPC85xx MDS board
@@ -34,6 +38,7 @@ config MPC8544_DS select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 + select CPU_8548 help This option enables support for the MPC8544 DS board
PATCH 2/4 move embedded6xx into multiplatform
In reply to Arnd BergmannThe various embedded 6xx systems can easily coexist in one kernel together with the other 6xx based systems, so there is no strict reason to keep them separate.
This also fixes a problem introduced in one earlier patch, where the embedded 74xx based systems could not automatically select altivec any more.
---
arch/powerpc/platforms/Kconfig +0 -4
@@ -12,10 +12,6 @@ config PPC_MULTIPLATFORM RS/6000 machine, an Apple machine, or a PReP, CHRP, Maple or Cell-based machine. -config EMBEDDED6xx - bool "Embedded 6xx/7xx/7xxx-based board" - depends on PPC32 && (BROKEN||BROKEN_ON_SMP) - config PPC_82xx bool "Freescale 82xx" depends on 6xx
arch/powerpc/platforms/embedded6xx/Kconfig +7 -4
@@ -1,9 +1,10 @@ -choice - prompt "Machine Type" - depends on EMBEDDED6xx +config EMBEDDED6xx + bool "Embedded 6xx/7xx/7xxx-based boards" + depends on PPC32 && BROKEN_ON_SMP && PPC_MULTIPLATFORM config LINKSTATION bool "Linkstation / Kurobox(HG) from Buffalo" + depends on EMBEDDED6xx select MPIC select FSL_SOC select PPC_UDBG_16550 if SERIAL_8250
@@ -18,6 +19,7 @@ config LINKSTATION config MPC7448HPC2 bool "Freescale MPC7448HPC2(Taiga)" + depends on EMBEDDED6xx select TSI108_BRIDGE select DEFAULT_UIMAGE select PPC_UDBG_16550
@@ -28,6 +30,7 @@ config MPC7448HPC2 config PPC_HOLLY bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)" + depends on EMBEDDED6xx select TSI108_BRIDGE select PPC_UDBG_16550 select WANT_DEVICE_TREE
@@ -38,13 +41,13 @@ config PPC_HOLLY config PPC_PRPMC2800 bool "Motorola-PrPMC2800" + depends on EMBEDDED6xx select MV64X60 select NOT_COHERENT_CACHE select WANT_DEVICE_TREE select CPU_7450 help This option enables support for the Motorola PrPMC2800 board -endchoice config TSI108_BRIDGE bool
arch/powerpc/configs/holly_defconfig +36 -23
96 lines not on this page · raw message
arch/powerpc/configs/linkstation_defconfig +37 -25
100 lines not on this page · raw message
arch/powerpc/configs/mpc7448_hpc2_defconfig +36 -24
99 lines not on this page · raw message
arch/powerpc/configs/prpmc2800_defconfig +37 -27
90 lines not on this page · raw message
PATCH 3/4 move 86xx into multiplatform
In reply to Arnd BergmannMPC86xx based machines don't need their own kernel, but can run one that is shared with the other 6xx compatible machines, so we should allow that in Kconfig.
---
Kumar, I don't remember if you still had objections to merging 86xx annd 83xx into multiplatform after our last discussion.
Please Ack or Nack the two patches.
arch/powerpc/platforms/86xx/Kconfig +8 -6
@@ -1,10 +1,14 @@ -choice - prompt "86xx Board Type" - depends on PPC_86xx - default MPC8641_HPCN +config PPC_86xx + bool "Freescale 86xx based boards" + depends on 6xx + select FSL_SOC + select ALTIVEC + help + The Freescale E600 SoCs have 74xx cores. config MPC8641_HPCN bool "Freescale MPC8641 HPCN" + depends on PPC_86xx select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575
@@ -12,8 +16,6 @@ config MPC8641_HPCN help This option enables support for the MPC8641 HPCN board. -endchoice - config MPC8641 bool select FSL_PCI if PCI
arch/powerpc/platforms/Kconfig +0 -7
@@ -24,13 +24,6 @@ config PPC_83xx select 83xx select WANT_DEVICE_TREE -config PPC_86xx - bool "Freescale 86xx" - depends on 6xx - select FSL_SOC - select ALTIVEC - help - The Freescale E600 SoCs have 74xx cores. endchoice config CLASSIC32
arch/powerpc/configs/mpc8641_hpcn_defconfig +37 -23
111 lines not on this page · raw message
PATCH 4/4 move 83xx into multiplatform
In reply to Arnd BergmannMPC83xx based machines don't need their own kernel, but can run one that is shared with the other 6xx compatible machines, so we should allow that in Kconfig.
---
arch/powerpc/platforms/83xx/Kconfig +12 -6
@@ -1,10 +1,13 @@ -choice - prompt "83xx Board Type" - depends on PPC_83xx - default MPC834x_MDS +config PPC_83xx + bool "Freescale 83xx based boards" + depends on 6xx + select FSL_SOC + select 83xx + select WANT_DEVICE_TREE config MPC8313_RDB bool "Freescale MPC8313 RDB" + depends on PPC_83xx select DEFAULT_UIMAGE select CPU_603e help
@@ -12,6 +15,7 @@ config MPC8313_RDB config MPC832x_MDS bool "Freescale MPC832x MDS" + depends on PPC_83xx select DEFAULT_UIMAGE select QUICC_ENGINE select CPU_603e
@@ -20,6 +24,7 @@ config MPC832x_MDS config MPC832x_RDB bool "Freescale MPC832x RDB" + depends on PPC_83xx select DEFAULT_UIMAGE select QUICC_ENGINE select CPU_603e
@@ -28,6 +33,7 @@ config MPC832x_RDB config MPC834x_MDS bool "Freescale MPC834x MDS" + depends on PPC_83xx select DEFAULT_UIMAGE select CPU_603e help
@@ -40,6 +46,7 @@ config MPC834x_MDS config MPC834x_ITX bool "Freescale MPC834x ITX" + depends on PPC_83xx select DEFAULT_UIMAGE select CPU_603e help
@@ -50,14 +57,13 @@ config MPC834x_ITX config MPC836x_MDS bool "Freescale MPC836x MDS" + depends on PPC_83xx select DEFAULT_UIMAGE select QUICC_ENGINE select CPU_603e help This option enables support for the MPC836x MDS Processor Board. -endchoice - config PPC_MPC831x bool select PPC_UDBG_16550
arch/powerpc/platforms/Kconfig +0 -7
@@ -17,13 +17,6 @@ config PPC_82xx depends on 6xx select WANT_DEVICE_TREE -config PPC_83xx - bool "Freescale 83xx" - depends on 6xx - select FSL_SOC - select 83xx - select WANT_DEVICE_TREE - endchoice config CLASSIC32
arch/powerpc/configs/mpc8313_rdb_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc832x_mds_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc832x_rdb_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc834x_itx_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc834x_itxgp_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc834x_mds_defconfig +38 -21
110 lines not on this page · raw message
arch/powerpc/configs/mpc836x_mds_defconfig +38 -21
110 lines not on this page · raw message