Skip to content

Commit e69a7ff

Browse files
committed
s390: allow to compile with z16 optimizations
Add config and compile options which allow to compile with z16 optimizations if the compiler supports it. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 6203ac3 commit e69a7ff

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

arch/s390/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ config HAVE_MARCH_Z15_FEATURES
255255
def_bool n
256256
select HAVE_MARCH_Z14_FEATURES
257257

258+
config HAVE_MARCH_Z16_FEATURES
259+
def_bool n
260+
select HAVE_MARCH_Z15_FEATURES
261+
258262
choice
259263
prompt "Processor type"
260264
default MARCH_Z196
@@ -312,6 +316,14 @@ config MARCH_Z15
312316
and 8561 series). The kernel will be slightly faster but will not
313317
work on older machines.
314318

319+
config MARCH_Z16
320+
bool "IBM z16"
321+
select HAVE_MARCH_Z16_FEATURES
322+
depends on $(cc-option,-march=z16)
323+
help
324+
Select this to enable optimizations for IBM z16 (3931 and
325+
3932 series).
326+
315327
endchoice
316328

317329
config MARCH_Z10_TUNE
@@ -332,6 +344,9 @@ config MARCH_Z14_TUNE
332344
config MARCH_Z15_TUNE
333345
def_bool TUNE_Z15 || MARCH_Z15 && TUNE_DEFAULT
334346

347+
config MARCH_Z16_TUNE
348+
def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT
349+
335350
choice
336351
prompt "Tune code generation"
337352
default TUNE_DEFAULT
@@ -372,6 +387,10 @@ config TUNE_Z15
372387
bool "IBM z15"
373388
depends on $(cc-option,-mtune=z15)
374389

390+
config TUNE_Z16
391+
bool "IBM z16"
392+
depends on $(cc-option,-mtune=z16)
393+
375394
endchoice
376395

377396
config 64BIT

arch/s390/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12
4242
mflags-$(CONFIG_MARCH_Z13) := -march=z13
4343
mflags-$(CONFIG_MARCH_Z14) := -march=z14
4444
mflags-$(CONFIG_MARCH_Z15) := -march=z15
45+
mflags-$(CONFIG_MARCH_Z16) := -march=z16
4546

4647
export CC_FLAGS_MARCH := $(mflags-y)
4748

@@ -54,6 +55,7 @@ cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12
5455
cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
5556
cflags-$(CONFIG_MARCH_Z14_TUNE) += -mtune=z14
5657
cflags-$(CONFIG_MARCH_Z15_TUNE) += -mtune=z15
58+
cflags-$(CONFIG_MARCH_Z16_TUNE) += -mtune=z16
5759

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

0 commit comments

Comments
 (0)