diff options
author | Arnd Bergmann <arnd@arndb.de> | 2007-09-14 20:21:57 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-22 00:49:22 -0400 |
commit | 3164cccdc0e6e16eb9797586aaa8d1f759799c01 (patch) | |
tree | 5685db34bfa546cefcd1f6fc0cbbac8bd11945bb /arch | |
parent | fb8299ed31d474248c2028ab8393462841cc9b0b (diff) |
[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 <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/Makefile | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6015a92bc2a0..87aff5372d6e 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -92,6 +92,10 @@ else | |||
92 | endif | 92 | endif |
93 | endif | 93 | endif |
94 | 94 | ||
95 | ifeq ($(CONFIG_TUNE_CELL),y) | ||
96 | CFLAGS += $(call cc-option,-mtune=cell) | ||
97 | endif | ||
98 | |||
95 | # No AltiVec instruction when building kernel | 99 | # No AltiVec instruction when building kernel |
96 | CFLAGS += $(call cc-option,-mno-altivec) | 100 | CFLAGS += $(call cc-option,-mno-altivec) |
97 | 101 | ||
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 86eb4cf31f0b..4c315be25015 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -71,6 +71,18 @@ config POWER4 | |||
71 | depends on PPC64 | 71 | depends on PPC64 |
72 | def_bool y | 72 | def_bool y |
73 | 73 | ||
74 | config TUNE_CELL | ||
75 | bool "Optimize for Cell Broadband Engine" | ||
76 | depends on PPC64 | ||
77 | help | ||
78 | Cause the compiler to optimize for the PPE of the Cell Broadband | ||
79 | Engine. This will make the code run considerably faster on Cell | ||
80 | but somewhat slower on other machines. This option only changes | ||
81 | the scheduling of instructions, not the selection of instructions | ||
82 | itself, so the resulting kernel will keep running on all other | ||
83 | machines. When building a kernel that is supposed to run only | ||
84 | on Cell, you should also select the POWER4_ONLY option. | ||
85 | |||
74 | config 6xx | 86 | config 6xx |
75 | bool | 87 | bool |
76 | 88 | ||