Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390: Allow to compile with z17 optimizations

Add config and compile options which allow to compile with z17
optimizations if the compiler supports it. Add the
miscellaneous-instruction-extension 4 facility to the list of facilities
for z17.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Vasily Gorbik and committed by
Heiko Carstens
c51ea988 8231a0e6

+28
+19
arch/s390/Kconfig
··· 332 332 def_bool n 333 333 select HAVE_MARCH_Z15_FEATURES 334 334 335 + config HAVE_MARCH_Z17_FEATURES 336 + def_bool n 337 + select HAVE_MARCH_Z16_FEATURES 338 + 335 339 choice 336 340 prompt "Processor type" 337 341 default MARCH_Z196 ··· 401 397 Select this to enable optimizations for IBM z16 (3931 and 402 398 3932 series). 403 399 400 + config MARCH_Z17 401 + bool "IBM z17" 402 + select HAVE_MARCH_Z17_FEATURES 403 + depends on $(cc-option,-march=z17) 404 + help 405 + Select this to enable optimizations for IBM z17 (9175 and 406 + 9176 series). 407 + 404 408 endchoice 405 409 406 410 config MARCH_Z10_TUNE ··· 431 419 432 420 config MARCH_Z16_TUNE 433 421 def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT 422 + 423 + config MARCH_Z17_TUNE 424 + def_bool TUNE_Z17 || MARCH_Z17 && TUNE_DEFAULT 434 425 435 426 choice 436 427 prompt "Tune code generation" ··· 478 463 config TUNE_Z16 479 464 bool "IBM z16" 480 465 depends on $(cc-option,-mtune=z16) 466 + 467 + config TUNE_Z17 468 + bool "IBM z17" 469 + depends on $(cc-option,-mtune=z17) 481 470 482 471 endchoice 483 472
+2
arch/s390/Makefile
··· 48 48 mflags-$(CONFIG_MARCH_Z14) := -march=z14 49 49 mflags-$(CONFIG_MARCH_Z15) := -march=z15 50 50 mflags-$(CONFIG_MARCH_Z16) := -march=z16 51 + mflags-$(CONFIG_MARCH_Z17) := -march=z17 51 52 52 53 export CC_FLAGS_MARCH := $(mflags-y) 53 54 ··· 62 61 cflags-$(CONFIG_MARCH_Z14_TUNE) += -mtune=z14 63 62 cflags-$(CONFIG_MARCH_Z15_TUNE) += -mtune=z15 64 63 cflags-$(CONFIG_MARCH_Z16_TUNE) += -mtune=z16 64 + cflags-$(CONFIG_MARCH_Z17_TUNE) += -mtune=z17 65 65 66 66 cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include 67 67
+4
arch/s390/include/asm/march.h
··· 33 33 #define MARCH_HAS_Z16_FEATURES 1 34 34 #endif 35 35 36 + #ifdef CONFIG_HAVE_MARCH_Z17_FEATURES 37 + #define MARCH_HAS_Z17_FEATURES 1 38 + #endif 39 + 36 40 #endif /* __DECOMPRESSOR */ 37 41 38 42 #endif /* __ASM_S390_MARCH_H */
+3
arch/s390/tools/gen_facilities.c
··· 54 54 #ifdef CONFIG_HAVE_MARCH_Z15_FEATURES 55 55 61, /* miscellaneous-instruction-extension 3 */ 56 56 #endif 57 + #ifdef CONFIG_HAVE_MARCH_Z17_FEATURES 58 + 84, /* miscellaneous-instruction-extension 4 */ 59 + #endif 57 60 -1 /* END */ 58 61 } 59 62 },