aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-10-30 07:12:50 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-10-31 04:54:01 -0400
commit1db9e0513d7478f6c80ca0bc4f58f53fe49e27f8 (patch)
tree511995f3ff6a9577b8a93a6eb2192febe8a8f353
parentb226635ab82f5f5374dd6ccc9d257b41bcc41599 (diff)
s390: allow to set gcc -mtune flag
Add a new Kconfig choice group which allows to configure how gcc should tune the generated code (via -mtune option). By default the -mtune parameter will match the -march parameter. This is a rather large patch, but I wouldn't know how to make this shorter unfortunately. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/Kconfig61
-rw-r--r--arch/s390/Makefile8
2 files changed, 69 insertions, 0 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index a02177fb5ec1..f75d7e517927 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -238,6 +238,67 @@ config MARCH_ZEC12
238 238
239endchoice 239endchoice
240 240
241config MARCH_G5_TUNE
242 def_bool TUNE_G5 || MARCH_G5 && TUNE_DEFAULT
243
244config MARCH_Z900_TUNE
245 def_bool TUNE_Z900 || MARCH_Z900 && TUNE_DEFAULT
246
247config MARCH_Z990_TUNE
248 def_bool TUNE_Z990 || MARCH_Z990 && TUNE_DEFAULT
249
250config MARCH_Z9_109_TUNE
251 def_bool TUNE_Z9_109 || MARCH_Z9_109 && TUNE_DEFAULT
252
253config MARCH_Z10_TUNE
254 def_bool TUNE_Z10 || MARCH_Z10 && TUNE_DEFAULT
255
256config MARCH_Z196_TUNE
257 def_bool TUNE_Z196 || MARCH_Z196 && TUNE_DEFAULT
258
259config MARCH_ZEC12_TUNE
260 def_bool TUNE_ZEC12 || MARCH_ZEC12 && TUNE_DEFAULT
261
262choice
263 prompt "Tune code generation"
264 default TUNE_DEFAULT
265 help
266 Cause the compiler to tune (-mtune) the generated code for a machine.
267 This will make the code run faster on the selected machine but
268 somewhat slower on other machines.
269 This option only changes how the compiler emits instructions, not the
270 selection of instructions itself, so the resulting kernel will run on
271 all other machines.
272
273config TUNE_DEFAULT
274 bool "Default"
275 help
276 Tune the generated code for the target processor for which the kernel
277 will be compiled.
278
279config TUNE_G5
280 bool "System/390 model G5 and G6"
281
282config TUNE_Z900
283 bool "IBM zSeries model z800 and z900"
284
285config TUNE_Z990
286 bool "IBM zSeries model z890 and z990"
287
288config TUNE_Z9_109
289 bool "IBM System z9"
290
291config TUNE_Z10
292 bool "IBM System z10"
293
294config TUNE_Z196
295 bool "IBM zEnterprise 114 and 196"
296
297config TUNE_ZEC12
298 bool "IBM zBC12 and zEC12"
299
300endchoice
301
241config 64BIT 302config 64BIT
242 def_bool y 303 def_bool y
243 prompt "64 bit kernel" 304 prompt "64 bit kernel"
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index ecc9d4f73cc6..874e6d6e9c5f 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -43,6 +43,14 @@ cflags-$(CONFIG_MARCH_Z10) += -march=z10
43cflags-$(CONFIG_MARCH_Z196) += -march=z196 43cflags-$(CONFIG_MARCH_Z196) += -march=z196
44cflags-$(CONFIG_MARCH_ZEC12) += -march=zEC12 44cflags-$(CONFIG_MARCH_ZEC12) += -march=zEC12
45 45
46cflags-$(CONFIG_MARCH_G5_TUNE) += -mtune=g5
47cflags-$(CONFIG_MARCH_Z900_TUNE) += -mtune=z900
48cflags-$(CONFIG_MARCH_Z990_TUNE) += -mtune=z990
49cflags-$(CONFIG_MARCH_Z9_109_TUNE) += -mtune=z9-109
50cflags-$(CONFIG_MARCH_Z10_TUNE) += -mtune=z10
51cflags-$(CONFIG_MARCH_Z196_TUNE) += -mtune=z196
52cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12
53
46#KBUILD_IMAGE is necessary for make rpm 54#KBUILD_IMAGE is necessary for make rpm
47KBUILD_IMAGE :=arch/s390/boot/image 55KBUILD_IMAGE :=arch/s390/boot/image
48 56