diff options
author | Scott Wood <scottwood@freescale.com> | 2013-08-20 20:55:36 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-08-20 20:55:36 -0400 |
commit | 01718ba6ec30013c7d47084876b9c16471b291af (patch) | |
tree | 5ae076f618a20331083c85efa85f72cc1a7cb146 | |
parent | f49596a4cf4753d13951608f24f939a59fdcc653 (diff) |
powerpc/booke64: Use appropriate -mcpu
By default use -mcpu=powerpc64 rather than -mtune=power7
Add options for e5500/e6500, with fallbacks for older compilers.
Hide the POWER cpu options in booke configs.
Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r-- | arch/powerpc/Makefile | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6930c935d292..32dfd5dc2be6 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -88,13 +88,22 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) | |||
88 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) | 88 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) |
89 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple | 89 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple |
90 | 90 | ||
91 | ifeq ($(CONFIG_PPC_BOOK3S_64),y) | ||
91 | CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4) | 92 | CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4) |
93 | else | ||
94 | CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 | ||
95 | endif | ||
96 | |||
92 | CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell) | 97 | CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell) |
93 | CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4) | 98 | CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4) |
94 | CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) | 99 | CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) |
95 | CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) | 100 | CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) |
96 | CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) | 101 | CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) |
97 | 102 | ||
103 | E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) | ||
104 | CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) | ||
105 | CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) | ||
106 | |||
98 | CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) | 107 | CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) |
99 | 108 | ||
100 | KBUILD_CPPFLAGS += -Iarch/$(ARCH) | 109 | KBUILD_CPPFLAGS += -Iarch/$(ARCH) |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 47d9a03dd415..6704e2e20e6b 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -96,18 +96,31 @@ config GENERIC_CPU | |||
96 | 96 | ||
97 | config CELL_CPU | 97 | config CELL_CPU |
98 | bool "Cell Broadband Engine" | 98 | bool "Cell Broadband Engine" |
99 | depends on PPC_BOOK3S_64 | ||
99 | 100 | ||
100 | config POWER4_CPU | 101 | config POWER4_CPU |
101 | bool "POWER4" | 102 | bool "POWER4" |
103 | depends on PPC_BOOK3S_64 | ||
102 | 104 | ||
103 | config POWER5_CPU | 105 | config POWER5_CPU |
104 | bool "POWER5" | 106 | bool "POWER5" |
107 | depends on PPC_BOOK3S_64 | ||
105 | 108 | ||
106 | config POWER6_CPU | 109 | config POWER6_CPU |
107 | bool "POWER6" | 110 | bool "POWER6" |
111 | depends on PPC_BOOK3S_64 | ||
108 | 112 | ||
109 | config POWER7_CPU | 113 | config POWER7_CPU |
110 | bool "POWER7" | 114 | bool "POWER7" |
115 | depends on PPC_BOOK3S_64 | ||
116 | |||
117 | config E5500_CPU | ||
118 | bool "Freescale e5500" | ||
119 | depends on E500 | ||
120 | |||
121 | config E6500_CPU | ||
122 | bool "Freescale e6500" | ||
123 | depends on E500 | ||
111 | 124 | ||
112 | endchoice | 125 | endchoice |
113 | 126 | ||