Commit 3164cccd authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Mackerras

[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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent fb8299ed
...@@ -92,6 +92,10 @@ else ...@@ -92,6 +92,10 @@ else
endif endif
endif endif
ifeq ($(CONFIG_TUNE_CELL),y)
CFLAGS += $(call cc-option,-mtune=cell)
endif
# No AltiVec instruction when building kernel # No AltiVec instruction when building kernel
CFLAGS += $(call cc-option,-mno-altivec) CFLAGS += $(call cc-option,-mno-altivec)
......
...@@ -71,6 +71,18 @@ config POWER4 ...@@ -71,6 +71,18 @@ config POWER4
depends on PPC64 depends on PPC64
def_bool y 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 config 6xx
bool bool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment