Skip to content

Commit c51ea98

Browse files
Vasily Gorbikhcahca
authored andcommitted
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>
1 parent 8231a0e commit c51ea98

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

arch/s390/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ config HAVE_MARCH_Z16_FEATURES
332332
def_bool n
333333
select HAVE_MARCH_Z15_FEATURES
334334

335+
config HAVE_MARCH_Z17_FEATURES
336+
def_bool n
337+
select HAVE_MARCH_Z16_FEATURES
338+
335339
choice
336340
prompt "Processor type"
337341
default MARCH_Z196
@@ -397,6 +401,14 @@ config MARCH_Z16
397401
Select this to enable optimizations for IBM z16 (3931 and
398402
3932 series).
399403

404+
config MARCH_Z17
405+
bool "IBM z17"
406+
select HAVE_MARCH_Z17_FEATURES
407+
depends on $(cc-option,-march=z17)
408+
help
409+
Select this to enable optimizations for IBM z17 (9175 and
410+
9176 series).
411+
400412
endchoice
401413

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

435+
config MARCH_Z17_TUNE
436+
def_bool TUNE_Z17 || MARCH_Z17 && TUNE_DEFAULT
437+
423438
choice
424439
prompt "Tune code generation"
425440
default TUNE_DEFAULT
@@ -464,6 +479,10 @@ config TUNE_Z16
464479
bool "IBM z16"
465480
depends on $(cc-option,-mtune=z16)
466481

482+
config TUNE_Z17
483+
bool "IBM z17"
484+
depends on $(cc-option,-mtune=z17)
485+
467486
endchoice
468487

469488
config 64BIT

arch/s390/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ mflags-$(CONFIG_MARCH_Z13) := -march=z13
4848
mflags-$(CONFIG_MARCH_Z14) := -march=z14
4949
mflags-$(CONFIG_MARCH_Z15) := -march=z15
5050
mflags-$(CONFIG_MARCH_Z16) := -march=z16
51+
mflags-$(CONFIG_MARCH_Z17) := -march=z17
5152

5253
export CC_FLAGS_MARCH := $(mflags-y)
5354

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

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

arch/s390/include/asm/march.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#define MARCH_HAS_Z16_FEATURES 1
3434
#endif
3535

36+
#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
37+
#define MARCH_HAS_Z17_FEATURES 1
38+
#endif
39+
3640
#endif /* __DECOMPRESSOR */
3741

3842
#endif /* __ASM_S390_MARCH_H */

arch/s390/tools/gen_facilities.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ static struct facility_def facility_defs[] = {
5353
#endif
5454
#ifdef CONFIG_HAVE_MARCH_Z15_FEATURES
5555
61, /* miscellaneous-instruction-extension 3 */
56+
#endif
57+
#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
58+
84, /* miscellaneous-instruction-extension 4 */
5659
#endif
5760
-1 /* END */
5861
}

0 commit comments

Comments
 (0)