]> www.infradead.org Git - users/hch/misc.git/commitdiff
s390: Allow to compile with z17 optimizations
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 26 Aug 2024 20:13:47 +0000 (22:13 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 9 Apr 2025 10:12:41 +0000 (12:12 +0200)
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>
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/include/asm/march.h
arch/s390/tools/gen_facilities.c

index db8161ebb43cbb4a4b2bc769633b9e8bced192a9..99fb986fca6e8d3eabb3a364f8adb30a36af4486 100644 (file)
@@ -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
index b06dc53bfed54cd75be29ce66bec83e7058b2af0..7679bc16b692bd22ce8df9843f2c0c6d04555b06 100644 (file)
@@ -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
 
index fd9eef3be44ca45d39ec785f97532f3bfb2e0701..11a71bd1495496fc197cd2d76e415c05aa427772 100644 (file)
 #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 */
index 855f818deb98ef4b9e33a64fc2a6abc117ef3753..d5c68ade71ab79a9ea8fb49cae825dd1f68ab30c 100644 (file)
@@ -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 */
                }