Skip to content

Commit f8b2dcb

Browse files
author
Martin Schwidefsky
committed
s390: add z13 code generation support
Allow to generate code that only runs on z13 machines. Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent e982506 commit f8b2dcb

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

arch/s390/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ config HAVE_MARCH_ZEC12_FEATURES
185185
def_bool n
186186
select HAVE_MARCH_Z196_FEATURES
187187

188+
config HAVE_MARCH_Z13_FEATURES
189+
def_bool n
190+
select HAVE_MARCH_ZEC12_FEATURES
191+
188192
choice
189193
prompt "Processor type"
190194
default MARCH_G5
@@ -244,6 +248,14 @@ config MARCH_ZEC12
244248
2827 series). The kernel will be slightly faster but will not work on
245249
older machines.
246250

251+
config MARCH_Z13
252+
bool "IBM z13"
253+
select HAVE_MARCH_Z13_FEATURES if 64BIT
254+
help
255+
Select this to enable optimizations for IBM z13 (2964 series).
256+
The kernel will be slightly faster but will not work on older
257+
machines.
258+
247259
endchoice
248260

249261
config MARCH_G5_TUNE
@@ -267,6 +279,9 @@ config MARCH_Z196_TUNE
267279
config MARCH_ZEC12_TUNE
268280
def_bool TUNE_ZEC12 || MARCH_ZEC12 && TUNE_DEFAULT
269281

282+
config MARCH_Z13_TUNE
283+
def_bool TUNE_Z13 || MARCH_Z13 && TUNE_DEFAULT
284+
270285
choice
271286
prompt "Tune code generation"
272287
default TUNE_DEFAULT
@@ -305,6 +320,9 @@ config TUNE_Z196
305320
config TUNE_ZEC12
306321
bool "IBM zBC12 and zEC12"
307322

323+
config TUNE_Z13
324+
bool "IBM z13"
325+
308326
endchoice
309327

310328
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_Z9_109) := -march=z9-109
4242
mflags-$(CONFIG_MARCH_Z10) := -march=z10
4343
mflags-$(CONFIG_MARCH_Z196) := -march=z196
4444
mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12
45+
mflags-$(CONFIG_MARCH_Z13) := -march=z13
4546

4647
aflags-y += $(mflags-y)
4748
cflags-y += $(mflags-y)
@@ -53,6 +54,7 @@ cflags-$(CONFIG_MARCH_Z9_109_TUNE) += -mtune=z9-109
5354
cflags-$(CONFIG_MARCH_Z10_TUNE) += -mtune=z10
5455
cflags-$(CONFIG_MARCH_Z196_TUNE) += -mtune=z196
5556
cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12
57+
cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
5658

5759
#KBUILD_IMAGE is necessary for make rpm
5860
KBUILD_IMAGE :=arch/s390/boot/image

arch/s390/kernel/head.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,9 @@ ENTRY(startup_kdump)
436436
# followed by the facility words.
437437

438438
#if defined(CONFIG_64BIT)
439-
#if defined(CONFIG_MARCH_ZEC12)
439+
#if defined(CONFIG_MARCH_Z13)
440+
.long 3, 0xc100eff2, 0xf46ce800, 0x00400000
441+
#elif defined(CONFIG_MARCH_ZEC12)
440442
.long 3, 0xc100eff2, 0xf46ce800, 0x00400000
441443
#elif defined(CONFIG_MARCH_Z196)
442444
.long 2, 0xc100eff2, 0xf46c0000

arch/s390/kernel/setup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ static void __init setup_hwcaps(void)
810810
case 0x2828:
811811
strcpy(elf_platform, "zEC12");
812812
break;
813+
case 0x2964:
814+
strcpy(elf_platform, "z13");
815+
break;
813816
}
814817
}
815818

0 commit comments

Comments
 (0)