Commit c51ea988 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Heiko Carstens
Browse files

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: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 8231a0e6
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -332,6 +332,10 @@ config HAVE_MARCH_Z16_FEATURES
	def_bool n
	select HAVE_MARCH_Z15_FEATURES

config HAVE_MARCH_Z17_FEATURES
	def_bool n
	select HAVE_MARCH_Z16_FEATURES

choice
	prompt "Processor type"
	default MARCH_Z196
@@ -397,6 +401,14 @@ config MARCH_Z16
	  Select this to enable optimizations for IBM z16 (3931 and
	  3932 series).

config MARCH_Z17
	bool "IBM z17"
	select HAVE_MARCH_Z17_FEATURES
	depends on $(cc-option,-march=z17)
	help
	  Select this to enable optimizations for IBM z17 (9175 and
	  9176 series).

endchoice

config MARCH_Z10_TUNE
@@ -420,6 +432,9 @@ config MARCH_Z15_TUNE
config MARCH_Z16_TUNE
	def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT

config MARCH_Z17_TUNE
	def_bool TUNE_Z17 || MARCH_Z17 && TUNE_DEFAULT

choice
	prompt "Tune code generation"
	default TUNE_DEFAULT
@@ -464,6 +479,10 @@ config TUNE_Z16
	bool "IBM z16"
	depends on $(cc-option,-mtune=z16)

config TUNE_Z17
	bool "IBM z17"
	depends on $(cc-option,-mtune=z17)

endchoice

config 64BIT
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ mflags-$(CONFIG_MARCH_Z13) := -march=z13
mflags-$(CONFIG_MARCH_Z14)    := -march=z14
mflags-$(CONFIG_MARCH_Z15)    := -march=z15
mflags-$(CONFIG_MARCH_Z16)    := -march=z16
mflags-$(CONFIG_MARCH_Z17)    := -march=z17

export CC_FLAGS_MARCH := $(mflags-y)

@@ -61,6 +62,7 @@ cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
cflags-$(CONFIG_MARCH_Z14_TUNE)		+= -mtune=z14
cflags-$(CONFIG_MARCH_Z15_TUNE)		+= -mtune=z15
cflags-$(CONFIG_MARCH_Z16_TUNE)		+= -mtune=z16
cflags-$(CONFIG_MARCH_Z17_TUNE)		+= -mtune=z17

cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include

+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@
#define MARCH_HAS_Z16_FEATURES 1
#endif

#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
#define MARCH_HAS_Z17_FEATURES 1
#endif

#endif /* __DECOMPRESSOR */

#endif /* __ASM_S390_MARCH_H */
+3 −0
Original line number Diff line number Diff line
@@ -53,6 +53,9 @@ static struct facility_def facility_defs[] = {
#endif
#ifdef CONFIG_HAVE_MARCH_Z15_FEATURES
			61, /* miscellaneous-instruction-extension 3 */
#endif
#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
			84, /* miscellaneous-instruction-extension 4 */
#endif
			-1 /* END */
		}