Commit 6997c323 authored by Martin Schwidefsky's avatar Martin Schwidefsky

s390: add support for IBM z14 machines

Add detection for machine type 0x3906 and set the ELF platform name
to z14. Add the miscellaneous-instruction-extension 2 facility to
the list of facilities for z14.

And allow to generate code that only runs on a z14 machine.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 6e2ef5e4
...@@ -222,6 +222,10 @@ config HAVE_MARCH_Z13_FEATURES ...@@ -222,6 +222,10 @@ config HAVE_MARCH_Z13_FEATURES
def_bool n def_bool n
select HAVE_MARCH_ZEC12_FEATURES select HAVE_MARCH_ZEC12_FEATURES
config HAVE_MARCH_Z14_FEATURES
def_bool n
select HAVE_MARCH_Z13_FEATURES
choice choice
prompt "Processor type" prompt "Processor type"
default MARCH_Z196 default MARCH_Z196
...@@ -282,6 +286,14 @@ config MARCH_Z13 ...@@ -282,6 +286,14 @@ config MARCH_Z13
2964 series). The kernel will be slightly faster but will not work on 2964 series). The kernel will be slightly faster but will not work on
older machines. older machines.
config MARCH_Z14
bool "IBM z14"
select HAVE_MARCH_Z14_FEATURES
help
Select this to enable optimizations for IBM z14 (3906 series).
The kernel will be slightly faster but will not work on older
machines.
endchoice endchoice
config MARCH_Z900_TUNE config MARCH_Z900_TUNE
...@@ -305,6 +317,9 @@ config MARCH_ZEC12_TUNE ...@@ -305,6 +317,9 @@ config MARCH_ZEC12_TUNE
config MARCH_Z13_TUNE config MARCH_Z13_TUNE
def_bool TUNE_Z13 || MARCH_Z13 && TUNE_DEFAULT def_bool TUNE_Z13 || MARCH_Z13 && TUNE_DEFAULT
config MARCH_Z14_TUNE
def_bool TUNE_Z14 || MARCH_Z14 && TUNE_DEFAULT
choice choice
prompt "Tune code generation" prompt "Tune code generation"
default TUNE_DEFAULT default TUNE_DEFAULT
...@@ -343,6 +358,9 @@ config TUNE_ZEC12 ...@@ -343,6 +358,9 @@ config TUNE_ZEC12
config TUNE_Z13 config TUNE_Z13
bool "IBM z13" bool "IBM z13"
config TUNE_Z14
bool "IBM z14"
endchoice endchoice
config 64BIT config 64BIT
......
...@@ -31,7 +31,8 @@ mflags-$(CONFIG_MARCH_Z9_109) := -march=z9-109 ...@@ -31,7 +31,8 @@ mflags-$(CONFIG_MARCH_Z9_109) := -march=z9-109
mflags-$(CONFIG_MARCH_Z10) := -march=z10 mflags-$(CONFIG_MARCH_Z10) := -march=z10
mflags-$(CONFIG_MARCH_Z196) := -march=z196 mflags-$(CONFIG_MARCH_Z196) := -march=z196
mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12 mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12
mflags-$(CONFIG_MARCH_Z13) := -march=z13 mflags-$(CONFIG_MARCH_Z13) := -march=z13
mflags-$(CONFIG_MARCH_Z14) := -march=z14
export CC_FLAGS_MARCH := $(mflags-y) export CC_FLAGS_MARCH := $(mflags-y)
...@@ -44,7 +45,8 @@ cflags-$(CONFIG_MARCH_Z9_109_TUNE) += -mtune=z9-109 ...@@ -44,7 +45,8 @@ cflags-$(CONFIG_MARCH_Z9_109_TUNE) += -mtune=z9-109
cflags-$(CONFIG_MARCH_Z10_TUNE) += -mtune=z10 cflags-$(CONFIG_MARCH_Z10_TUNE) += -mtune=z10
cflags-$(CONFIG_MARCH_Z196_TUNE) += -mtune=z196 cflags-$(CONFIG_MARCH_Z196_TUNE) += -mtune=z196
cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12 cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12
cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13 cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
cflags-$(CONFIG_MARCH_Z14_TUNE) += -mtune=z14
cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
......
...@@ -818,6 +818,9 @@ static int __init setup_hwcaps(void) ...@@ -818,6 +818,9 @@ static int __init setup_hwcaps(void)
case 0x2965: case 0x2965:
strcpy(elf_platform, "z13"); strcpy(elf_platform, "z13");
break; break;
case 0x3906:
strcpy(elf_platform, "z14");
break;
} }
/* /*
......
...@@ -53,6 +53,9 @@ static struct facility_def facility_defs[] = { ...@@ -53,6 +53,9 @@ static struct facility_def facility_defs[] = {
#endif #endif
#ifdef CONFIG_HAVE_MARCH_Z13_FEATURES #ifdef CONFIG_HAVE_MARCH_Z13_FEATURES
53, /* load-and-zero-rightmost-byte, etc. */ 53, /* load-and-zero-rightmost-byte, etc. */
#endif
#ifdef CONFIG_HAVE_MARCH_Z14_FEATURES
58, /* miscellaneous-instruction-extension 2 */
#endif #endif
-1 /* END */ -1 /* END */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment