* [PATCH 0/5] Kconfig cleanup revisited
@ 2007-07-12 21:01 Arnd Bergmann
2007-07-12 21:01 ` [PATCH 2/5] linkstation: fix multiplatform build Arnd Bergmann
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:01 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
Since this was brought up by Mark, here is a resend of the
Kconfig cleanup patches that have not been merged so far,
with updates for the comments I received.
I stumbled over another bug in the process, and fear I have
found a can of worms there (not opened yet): There are
still many files under arch/powerpc that include headers
from include/asm-ppc/. Most of these includes can simply
be removed, but some are real bugs, where generic code still
relies on board-specific macro definitions.
Arnd <><
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/5] linkstation: fix multiplatform build
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
@ 2007-07-12 21:01 ` Arnd Bergmann
2007-07-12 21:01 ` [PATCH 3/5] move embedded6xx into multiplatform Arnd Bergmann
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:01 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
The ls_uart file accidentally includes two headers from asm-ppc that
are no longer needed but cause a broken build in some configurations.
Kill the includes to fix the build.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
index d0bee9f..3b023b0 100644
--- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
+++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
@@ -4,8 +4,6 @@
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
#include <asm/io.h>
-#include <asm/mpc10x.h>
-#include <asm/ppc_sys.h>
#include <asm/prom.h>
#include <asm/termbits.h>
--
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] move embedded6xx into multiplatform
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
2007-07-12 21:01 ` [PATCH 2/5] linkstation: fix multiplatform build Arnd Bergmann
@ 2007-07-12 21:01 ` Arnd Bergmann
2007-07-12 21:02 ` [PATCH 4/5] move 86xx " Arnd Bergmann
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:01 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
The 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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Index: linux-2.6/arch/powerpc/platforms/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig
+++ linux-2.6/arch/powerpc/platforms/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -1,9 +1,10 @@
-choice
- prompt "Machine Type"
- depends on EMBEDDED6xx
+config EMBEDDED6xx
+ bool "Embedded 6xx/7xx/7xxx-based boards"
+ depends on PPC32 && (BROKEN||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
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/5] move 86xx into multiplatform
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
2007-07-12 21:01 ` [PATCH 2/5] linkstation: fix multiplatform build Arnd Bergmann
2007-07-12 21:01 ` [PATCH 3/5] move embedded6xx into multiplatform Arnd Bergmann
@ 2007-07-12 21:02 ` Arnd Bergmann
2007-07-13 16:10 ` Jon Loeliger
2007-07-12 21:02 ` [PATCH 5/5] move 83xx " Arnd Bergmann
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:02 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
MPC86xx 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.
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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.
Index: linux-2.6/arch/powerpc/platforms/86xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/86xx/Kconfig
@@ -1,18 +1,20 @@
-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 CPU_7450
help
This option enables support for the MPC8641 HPCN board.
-endchoice
-
config MPC8641
bool
select PPC_INDIRECT_PCI
Index: linux-2.6/arch/powerpc/platforms/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig
+++ linux-2.6/arch/powerpc/platforms/Kconfig
@@ -23,13 +23,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
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/5] move 83xx into multiplatform
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
` (2 preceding siblings ...)
2007-07-12 21:02 ` [PATCH 4/5] move 86xx " Arnd Bergmann
@ 2007-07-12 21:02 ` Arnd Bergmann
2007-07-12 21:12 ` [PATCH 1/5] autoselect optimal -mcpu= flag by platform Arnd Bergmann
2007-07-13 1:39 ` [PATCH 0/5] Kconfig cleanup revisited Mark A. Greer
5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:02 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
MPC83xx 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.
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Index: linux-2.6/arch/powerpc/platforms/83xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/83xx/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig
+++ linux-2.6/arch/powerpc/platforms/Kconfig
@@ -16,13 +16,6 @@ config PPC_82xx
bool "Freescale 82xx"
depends on 6xx
-config PPC_83xx
- bool "Freescale 83xx"
- depends on 6xx
- select FSL_SOC
- select 83xx
- select WANT_DEVICE_TREE
-
endchoice
config CLASSIC32
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] autoselect optimal -mcpu= flag by platform
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
` (3 preceding siblings ...)
2007-07-12 21:02 ` [PATCH 5/5] move 83xx " Arnd Bergmann
@ 2007-07-12 21:12 ` Arnd Bergmann
2007-07-13 1:39 ` [PATCH 0/5] Kconfig cleanup revisited Mark A. Greer
5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-12 21:12 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
updates include:
- lots of added help texts
- pass -mcpu=power3 instead of -mcpu=powerpc64 to work around a gcc bug
-
Index: linux-2.6/arch/powerpc/platforms/4xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/4xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/4xx/Kconfig
@@ -87,6 +87,7 @@ endmenu
# 40x specific CPU modules, selected based on the board above.
config NP405H
bool
+ select CPU_405
#depends on ASH
# OAK doesn't exist but wanted to keep this around for any future 403GCX boards
@@ -94,6 +95,7 @@ config 403GCX
bool
#depends on OAK
select IBM405_ERR51
+ select CPU_403
config 405GP
bool
@@ -102,19 +104,23 @@ config 405GP
config 405EP
bool
+ select CPU_405
config 405GPR
bool
+ select CPU_405
config VIRTEX_II_PRO
bool
select IBM405_ERR77
select IBM405_ERR51
+ select CPU_405
config STB03xxx
bool
select IBM405_ERR77
select IBM405_ERR51
+ select CPU_405
# 40x errata/workaround config symbols, selected by the CPU models above
@@ -168,20 +174,25 @@ config 440EP
bool
select PPC_FPU
select IBM440EP_ERR42
+ select CPU_440
config 440GP
bool
select IBM_NEW_EMAC_ZMII
+ select CPU_440
config 440GX
bool
+ select CPU_440
config 440SP
bool
+ select CPU_440
config 440A
bool
depends on 440GX
+ select CPU_440
default y
# 44x errata/workaround config symbols, selected by the CPU models above
Index: linux-2.6/arch/powerpc/platforms/52xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/52xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/52xx/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/82xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/82xx/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/83xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/83xx/Kconfig
@@ -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.
Index: linux-2.6/arch/powerpc/platforms/86xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/86xx/Kconfig
@@ -7,6 +7,7 @@ config MPC8641_HPCN
bool "Freescale MPC8641 HPCN"
select PPC_I8259
select DEFAULT_UIMAGE
+ select CPU_7450
help
This option enables support for the MPC8641 HPCN board.
Index: linux-2.6/arch/powerpc/platforms/Kconfig.cputype
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig.cputype
+++ linux-2.6/arch/powerpc/platforms/Kconfig.cputype
@@ -51,14 +51,352 @@ config E200
endchoice
-config POWER4_ONLY
- bool "Optimize for POWER4"
+config PPC_CPU_SELECTION
+ bool "Advanced CPU selection"
+ help
+ The kernel can be built for a range of CPU types, which it
+ normally determines automatically from the platform types that
+ have been enabled. In order to optimized leaving out support
+ for the older CPUs or selecting the exact -mtune= option that
+ is passed to gcc, you can further optimize the kernel for a
+ particular system.
+
+ Selecting this option will not cause changes directly, but will
+ reveal further options.
+
+ If unsure, say N.
+
+config CPU_DEFAULT
+ bool "Don't specify -mcpu= to gcc" if PPC_CPU_SELECTION
+ help
+ When this option is selected, gcc is called without
+ any specific -mcpu= argument, regardless of which
+ CPUs are enabled in the next options.
+
+config CPU_RS64
+ bool "RS64" if PPC_CPU_SELECTION
depends on PPC64
- default n
- ---help---
- Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
- The resulting binary will not work on POWER3 or RS64 processors
- when compiled with binutils 2.15 or later.
+ default y if PPC_PSERIES || PPC_ISERIES
+ help
+ Select this if you want to have support for the first
+ generation of 64 bit PowerPC CPUs used in the late
+ 1990s in IBM RS/6000 and AS/400 machines.
+
+config CPU_POWER3
+ bool "IBM Power3" if PPC_CPU_SELECTION
+ depends on PPC64
+ default y if PPC_PSERIES
+ help
+ Select this if you want to have support for the
+ Power3 chip used in IBM RS/6000 and early pSeries
+ machines.
+
+config CPU_POWER4
+ bool "IBM Power4" if PPC_CPU_SELECTION
+ depends on PPC64
+ default y if PPC_PSERIES || PPC_ISERIES
+ help
+ Select this if you want to have support for the Power 4
+ processor used in IBM pSeries and iSeries machines.
+
+config CPU_POWER5
+ bool "IBM Power5" if PPC_CPU_SELECTION
+ depends on PPC64
+ default y if PPC_PSERIES
+ help
+ Select this if you want to have support for the Power 5
+ processor used in IBM System p and System i machines.
+
+config CPU_POWER6
+ bool "IBM Power6" if PPC_CPU_SELECTION
+ depends on PPC64
+ default y if PPC_PSERIES
+ select ALTIVEC
+ help
+ Select this if you want to have support for the Power 6
+ processor used in the latest IBM System p and System i
+ machines.
+
+config CPU_970
+ bool "IBM PowerPC 970 (G5)" if PPC_CPU_SELECTION
+ depends on PPC64
+ default y if PPC_PSERIES
+ select ALTIVEC
+ help
+ Select this if you want to have support for the PowerPC 970
+ processor used in Apple Power Macintosh G5 and IBM JS2x blade
+ servers and other systems.
+
+config CPU_CELL
+ bool "Sony/Toshiba/IBM Cell Broadband Engine" if PPC_CPU_SELECTION
+ depends on PPC64
+ select ALTIVEC
+ help
+ Select this if you want to have support for the Cell Broadband
+ Engine processor used the Sony Playstation 3, the IBM QS2x
+ blade servers and other systems.
+
+config CPU_PA6T
+ bool "PA Semi PA6T-1682M" if PPC_CPU_SELECTION
+ depends on PPC64
+ select ALTIVEC
+ help
+ Select this if you want to have support for the PA6T-1682M
+ processor from PA Semi.
+
+config CPU_601
+ bool "PowerPC 601 (G1)" if PPC_CPU_SELECTION
+ depends on 6xx
+ default PPC_CHRP || PPC_PREP
+ help
+ Select this if you really wish to have support for ancient PowerPC
+ 601 processors used in very early Power Macintosh machines and
+ some CHRP boards.
+ Most people will want to disable this option to get better
+ performance on modern machines.
+
+config CPU_603e
+ bool "PowerPC 603e, 604, 604e, 52xx, 82xx, 83xx (G2)" if PPC_CPU_SELECTION
+ depends on 6xx
+ default PPC_CHRP || PPC_PREP || PPC_PMAC
+ help
+ The 603e processor line is the most widespread implementation of
+ the PowerPC ISA, so you most likely want to enable this if you are
+ building a kernel for multiple platforms.
+
+config CPU_750
+ bool "PowerPC 740, 750 (G3)" if PPC_CPU_SELECTION
+ depends on 6xx
+ default PPC_PMAC
+ help
+ Select this for the G3 PowerPC 750 processor used in Apple
+ Power Macintosh and a number of embedded boards.
+
+config CPU_7400
+ bool "PowerPC 7400, 7410 (G4)" if PPC_CPU_SELECTION
+ depends on 6xx
+ default PPC_PMAC
+ select ALTIVEC
+ help
+ Select this for the early G4 PowerPC 7400 processor used in
+ a few Apple Power Macintosh and other machines.
+
+config CPU_7450
+ bool "PowerPC 744x, 745x, 86xx (G4)" if PPC_CPU_SELECTION
+ depends on 6xx
+ default PPC_PMAC
+ select ALTIVEC
+ help
+ Select this for the later G4 PowerPC 7450 processor and its
+ derivatives used in most of the late Apple Power Macintosh
+ machines and some high-performance embedded boards.
+
+config CPU_8540
+ bool "Freescale e500v1 (MPC8540 compatible)" if PPC_CPU_SELECTION
+ depends on PPC_85xx
+ help
+ Select this for the older version 1 of the e500 core used in
+ the earlier MPC85xx processors.
+
+config CPU_8548
+ bool "Freescale e500v2 (MPC8548 compatible)" if PPC_CPU_SELECTION
+ depends on PPC_85xx
+ help
+ Select this for the newer version 2 of the e500 core that was
+ first used in the MPC8548 processor.
+ Some versions of gcc don't know about this yet, so you may
+ also have to enable 8540 to get the best performance with
+ your compiler.
+
+config CPU_403
+ bool "IBM 403" if PPC_CPU_SELECTION
+ depends on 40x
+ help
+ The PowerPC 403 core is used in the first generation Tivo and
+ some other old machines. Select this only if you are sure that
+ you want to run your kernel on one of these machines.
+
+config CPU_405
+ bool "IBM/AMCC 405" if PPC_CPU_SELECTION
+ depends on 40x
+ default y
+ help
+ Practically all PowerPC 40x based platforms supported by Linux use
+ a 405 core, so you should enable this option.
+
+config CPU_440
+ bool "IBM/AMCC 440" if PPC_CPU_SELECTION
+ depends on 44x
+ default y
+ help
+ If you are building for a PowerPC 440 based, you don't really
+ have a choice here, say Y.
+
+choice
+ prompt "Tune for processor type" if PPC_CPU_SELECTION
+ default TUNE_POWER4 if PPC64
+ default TUNE_DEFAULT
+ help
+ This will choose the gcc flag to use for the -mtune= parameter.
+ See the above list for a description of the invidual options.
+
+ If unsure, select TUNE_DEFAULT, gcc will tune for the oldest
+ CPU that the kernel supports in that case, which usually
+ gives reasonable results on newer CPUs as well.
+
+config TUNE_DEFAULT
+ bool "Don't specify -mtune= to gcc"
+
+config TUNE_RS64
+ bool "RS64"
+ depends on CPU_RS64
+
+config TUNE_POWER3
+ bool "IBM Power3"
+ depends on CPU_POWER3
+
+config TUNE_POWER4
+ bool "IBM Power4"
+ depends on CPU_POWER4
+
+config TUNE_POWER5
+ bool "IBM Power5"
+ depends on CPU_POWER5
+
+config TUNE_POWER6
+ bool "IBM Power6"
+ depends on CPU_POWER6
+
+config TUNE_970
+ bool "IBM PowerPC 970 (G5)"
+ depends on CPU_970
+
+config TUNE_CELL
+ bool "Sony/Toshiba/IBM Cell Broadband Engine"
+ depends on CPU_CELL
+
+config TUNE_PA6T
+ bool "PA Semi PA6T-1682M"
+ depends on CPU_PA6T
+
+config TUNE_601
+ bool "PowerPC 601 (G1)"
+ depends on CPU_601
+
+config TUNE_603e
+ bool "PowerPC 603e, 604, 604e, 52xx, 82xx, 83xx (G2)"
+ depends on CPU_603e
+
+config TUNE_750
+ bool "PowerPC 740/750 (G3)"
+ depends on CPU_750
+
+config TUNE_7400
+ bool "PowerPC 7400, 7410 (G4)"
+ depends on CPU_7400
+
+config TUNE_7450
+ bool "PowerPC 744x, 745x, 86xx (G4)"
+ depends on CPU_7450
+
+config TUNE_821
+ bool "Freescale MPC821"
+ depends on 8xx
+
+config TUNE_823
+ bool "Freescale MPC823"
+ depends on 8xx
+
+config TUNE_860
+ bool "Freescale MPC860"
+ depends on 8xx
+
+config TUNE_403
+ bool "IBM 403"
+ depends on CPU_403
+
+config TUNE_405
+ bool "IBM/AMCC 405"
+ depends on CPU_405
+
+config TUNE_440
+ bool "IBM/AMCC 440"
+ depends on CPU_440
+
+config TUNE_8540
+ bool "Freescale e500v1"
+ depends on CPU_8540
+
+config TUNE_8548
+ bool "Freescale e500v2"
+ depends on CPU_8548
+
+config TUNE_E200
+ bool "Freescale e200"
+ depends on E200
+
+endchoice
+
+config PPC_MCPU
+ string
+ default "" if CPU_DEFAULT
+ default "-mcpu=power3" if CPU_POWER3 || CPU_RS64
+ default "-mcpu=power4" if (CPU_POWER5 || CPU_POWER6) && (CPU_970 || CPU_CELL || CPU_PA6T)
+ default "-mcpu=power4" if CPU_POWER4
+ default "-mcpu=power5" if CPU_POWER5
+ default "-mcpu=power6" if CPU_POWER6
+ default "-mcpu=970" if CPU_970
+ default "-mcpu=cell" if CPU_CELL
+ default "-mcpu=pa6t" if CPU_PA6T
+ default "-mcpu=power3" if PPC64
+ default "-mcpu=powerpc" if CPU_601 && (CPU_603e || CPU_750 || CPU_7400 || CPU_7450)
+ default "-mcpu=601" if CPU_601
+ default "-mcpu=603e" if CPU_603e
+ default "-mcpu=750" if CPU_750
+ default "-mcpu=7400" if CPU_7400
+ default "-mcpu=7450" if CPU_7450
+ default "-mcpu=8540" if CPU_8540
+ default "-mcpu=8548" if CPU_8548
+ default "-mcpu=powerpc" if (CPU_403 && CPU_405)
+ default "-mcpu=powerpc" if (CPU_403 || CPU_405) && CPU_440
+ default "-mcpu=403" if CPU_403
+ default "-mcpu=405" if CPU_405
+ default "-mcpu=440" if CPU_440
+ default "-mcpu=860" if PPC_8xx
+ default "-mcpu=e200" if E200
+ default "-mcpu=powerpc"
+
+config PPC_MTUNE
+ string
+ default "" if TUNE_DEFAULT
+ default "-mtune=power3" if TUNE_POWER3
+ default "-mtune=rs64a" if TUNE_RS64
+ default "-mtune=power4" if TUNE_POWER4
+ default "-mtune=power5" if TUNE_POWER5
+ default "-mtune=power6" if TUNE_POWER6
+ default "-mtune=970" if TUNE_970
+ default "-mtune=cell" if TUNE_CELL
+ default "-mtune=pa6t" if TUNE_PA6T
+ default "-mtune=601" if TUNE_601
+ default "-mtune=603e" if TUNE_603e
+ default "-mtune=750" if TUNE_750
+ default "-mtune=7400" if TUNE_7400
+ default "-mtune=7450" if TUNE_7450
+ default "-mtune=8540" if TUNE_8540
+ default "-mtune=8548" if TUNE_8548
+ default "-mtune=403" if TUNE_403
+ default "-mtune=405" if TUNE_405
+ default "-mtune=440" if TUNE_440
+ default "-mtune=821" if TUNE_821
+ default "-mtune=823" if TUNE_823
+ default "-mtune=860" if TUNE_860
+ default "-mtune=e200" if TUNE_E200
+ default "-mtune=power4" if PPC64
+
+# The next three options should probably go away
+config POWER4_ONLY
+ def_bool y
+ depends on PPC64 && !CPU_POWER3 && !CPU_RS64
config POWER3
bool
Index: linux-2.6/arch/powerpc/platforms/cell/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/Kconfig
+++ linux-2.6/arch/powerpc/platforms/cell/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/celleb/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/celleb/Kconfig
+++ linux-2.6/arch/powerpc/platforms/celleb/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -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
Index: linux-2.6/arch/powerpc/platforms/maple/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/maple/Kconfig
+++ linux-2.6/arch/powerpc/platforms/maple/Kconfig
@@ -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.
Index: linux-2.6/arch/powerpc/platforms/pasemi/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pasemi/Kconfig
+++ linux-2.6/arch/powerpc/platforms/pasemi/Kconfig
@@ -6,6 +6,7 @@ config PPC_PASEMI
select PPC_UDBG_16550
select PPC_NATIVE
select EMBEDDED
+ select CPU_PA6T
help
This option enables support for PA Semi's PWRficient line
of SoC processors, including PA6T-1682M
Index: linux-2.6/arch/powerpc/platforms/powermac/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/Kconfig
+++ linux-2.6/arch/powerpc/platforms/powermac/Kconfig
@@ -16,6 +16,7 @@ config PPC_PMAC64
select MPIC_U3_HT_IRQS
select GENERIC_TBSYNC
select PPC_970_NAP
+ select CPU_970
default y
Index: linux-2.6/arch/powerpc/platforms/ps3/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/ps3/Kconfig
+++ linux-2.6/arch/powerpc/platforms/ps3/Kconfig
@@ -2,6 +2,7 @@ config PPC_PS3
bool "Sony PS3 (incomplete)"
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
Index: linux-2.6/arch/powerpc/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/Makefile
+++ linux-2.6/arch/powerpc/Makefile
@@ -78,24 +78,23 @@ LINUXINCLUDE += $(LINUXINCLUDE-y)
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)
@@ -107,10 +106,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
Index: linux-2.6/arch/powerpc/platforms/85xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/85xx/Kconfig
@@ -6,24 +6,28 @@ 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_8540
help
This option enables support for the MPC 8560 ADS board
config MPC85xx_CDS
bool "Freescale MPC85xx CDS"
select DEFAULT_UIMAGE
+ select CPU_8548
help
This option enables support for the MPC85xx CDS board
config MPC85xx_MDS
bool "Freescale MPC85xx MDS"
select DEFAULT_UIMAGE
+ select CPU_8548
# select QUICC_ENGINE
help
This option enables support for the MPC85xx MDS board
@@ -31,6 +35,7 @@ config MPC85xx_MDS
config MPC8544_DS
bool "Freescale MPC8544 DS"
select DEFAULT_UIMAGE
+ select CPU_8548
help
This option enables support for the MPC8544 DS board
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] Kconfig cleanup revisited
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
` (4 preceding siblings ...)
2007-07-12 21:12 ` [PATCH 1/5] autoselect optimal -mcpu= flag by platform Arnd Bergmann
@ 2007-07-13 1:39 ` Mark A. Greer
2007-07-13 9:54 ` Arnd Bergmann
5 siblings, 1 reply; 10+ messages in thread
From: Mark A. Greer @ 2007-07-13 1:39 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, paulus
On Thu, Jul 12, 2007 at 11:01:56PM +0200, Arnd Bergmann wrote:
> Since this was brought up by Mark, here is a resend of the
> Kconfig cleanup patches that have not been merged so far,
> with updates for the comments I received.
>
> I stumbled over another bug in the process, and fear I have
> found a can of worms there (not opened yet): There are
> still many files under arch/powerpc that include headers
> from include/asm-ppc/. Most of these includes can simply
> be removed, but some are real bugs, where generic code still
> relies on board-specific macro definitions.
Hi Arnd,
I really like what you've done here, thanks.
The patches don't apply straight up so what other patches do these go
on top of?
Mark
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] Kconfig cleanup revisited
2007-07-13 1:39 ` [PATCH 0/5] Kconfig cleanup revisited Mark A. Greer
@ 2007-07-13 9:54 ` Arnd Bergmann
2007-07-13 17:31 ` Mark A. Greer
0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2007-07-13 9:54 UTC (permalink / raw)
To: Mark A. Greer; +Cc: linuxppc-dev, paulus
On Friday 13 July 2007, Mark A. Greer wrote:
> I really like what you've done here, thanks.
>
> The patches don't apply straight up so what other patches do these go
> on top of?
They are meant to apply on top of powerpc.git. I found now that
the first patch has a trivial reject against the for-2.6.23 branch,
but works fine for the master branch.
Should I resend?
Arnd <><
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/5] move 86xx into multiplatform
2007-07-12 21:02 ` [PATCH 4/5] move 86xx " Arnd Bergmann
@ 2007-07-13 16:10 ` Jon Loeliger
0 siblings, 0 replies; 10+ messages in thread
From: Jon Loeliger @ 2007-07-13 16:10 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev@ozlabs.org, Paul Mackerras
On Thu, 2007-07-12 at 16:02, Arnd Bergmann wrote:
> MPC86xx 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.
>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>
> 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.
Hmmm... Shouldn't this sort of change come
with an update to the 8641 defconfig too?
jdl
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] Kconfig cleanup revisited
2007-07-13 9:54 ` Arnd Bergmann
@ 2007-07-13 17:31 ` Mark A. Greer
0 siblings, 0 replies; 10+ messages in thread
From: Mark A. Greer @ 2007-07-13 17:31 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, paulus
On Fri, Jul 13, 2007 at 11:54:34AM +0200, Arnd Bergmann wrote:
> On Friday 13 July 2007, Mark A. Greer wrote:
> > I really like what you've done here, thanks.
> >
> > The patches don't apply straight up so what other patches do these go
> > on top of?
>
> They are meant to apply on top of powerpc.git.
Yep, me too.
> I found now that
> the first patch has a trivial reject against the for-2.6.23 branch,
> but works fine for the master branch.
Hrm, I'm on master and it doesn't apply but its minor so NBD.
> Should I resend?
Not for me but Paul might appreciate it. :)
Mark
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-07-13 17:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12 21:01 [PATCH 0/5] Kconfig cleanup revisited Arnd Bergmann
2007-07-12 21:01 ` [PATCH 2/5] linkstation: fix multiplatform build Arnd Bergmann
2007-07-12 21:01 ` [PATCH 3/5] move embedded6xx into multiplatform Arnd Bergmann
2007-07-12 21:02 ` [PATCH 4/5] move 86xx " Arnd Bergmann
2007-07-13 16:10 ` Jon Loeliger
2007-07-12 21:02 ` [PATCH 5/5] move 83xx " Arnd Bergmann
2007-07-12 21:12 ` [PATCH 1/5] autoselect optimal -mcpu= flag by platform Arnd Bergmann
2007-07-13 1:39 ` [PATCH 0/5] Kconfig cleanup revisited Mark A. Greer
2007-07-13 9:54 ` Arnd Bergmann
2007-07-13 17:31 ` Mark A. Greer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).