Commit:     3164cccdc0e6e16eb9797586aaa8d1f759799c01
Parent:     fb8299ed31d474248c2028ab8393462841cc9b0b
Author:     Arnd Bergmann <[EMAIL PROTECTED]>
AuthorDate: Sat Sep 15 10:21:57 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sat Sep 22 14:49:22 2007 +1000

    [POWERPC] add Kconfig option for optimizing for cell
    Since the PPE on cell is an in-order core, it suffers significantly
    from wrong instruction scheduling.  This adds a Kconfig option that
    enables passing -mtune=cell to gcc in order to generate object
    code that runs well on cell.
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/Makefile                  |    4 ++++
 arch/powerpc/platforms/Kconfig.cputype |   12 ++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6015a92..87aff53 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -92,6 +92,10 @@ else
+ifeq ($(CONFIG_TUNE_CELL),y)
+       CFLAGS += $(call cc-option,-mtune=cell)
 # No AltiVec instruction when building kernel
 CFLAGS += $(call cc-option,-mno-altivec)
diff --git a/arch/powerpc/platforms/Kconfig.cputype 
index 86eb4cf..4c315be 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -71,6 +71,18 @@ config POWER4
        depends on PPC64
        def_bool y
+config TUNE_CELL
+       bool "Optimize for Cell Broadband Engine"
+       depends on PPC64
+       help
+         Cause the compiler to optimize for the PPE of the Cell Broadband
+         Engine. This will make the code run considerably faster on Cell
+         but somewhat slower on other machines. This option only changes
+         the scheduling of instructions, not the selection of instructions
+         itself, so the resulting kernel will keep running on all other
+         machines. When building a kernel that is supposed to run only
+         on Cell, you should also select the POWER4_ONLY option.
 config 6xx
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to