Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343390
b: refs/heads/master
c: 991c150
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Nov 23, 2012
1 parent fd39efb commit 7f6496d
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1e57508fbd63b340788afe6f2c74a608603e714
refs/heads/master: 991c15053a3fc209d76f03c73d4f0621025c9452
11 changes: 11 additions & 0 deletions trunk/arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ config HAVE_MARCH_Z196_FEATURES
def_bool n
select HAVE_MARCH_Z10_FEATURES

config HAVE_MARCH_ZEC12_FEATURES
def_bool n
select HAVE_MARCH_Z196_FEATURES

choice
prompt "Processor type"
default MARCH_G5
Expand Down Expand Up @@ -220,6 +224,13 @@ config MARCH_Z196
(2818 and 2817 series). The kernel will be slightly faster but will
not work on older machines.

config MARCH_ZEC12
bool "IBM zEC12"
select HAVE_MARCH_ZEC12_FEATURES if 64BIT
help
Select this to enable optimizations for IBM zEC12 (2827 series). The
kernel will be slightly faster but will not work on older machines.

endchoice

config 64BIT
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
cflags-$(CONFIG_MARCH_Z10) += $(call cc-option,-march=z10)
cflags-$(CONFIG_MARCH_Z196) += $(call cc-option,-march=z196)
cflags-$(CONFIG_MARCH_ZEC12) += $(call cc-option,-march=zEC12)

#KBUILD_IMAGE is necessary for make rpm
KBUILD_IMAGE :=arch/s390/boot/image
Expand Down
74 changes: 44 additions & 30 deletions trunk/arch/s390/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -393,64 +393,78 @@ ENTRY(startup_kdump)
xc 0x300(256),0x300
xc 0xe00(256),0xe00
stck __LC_LAST_UPDATE_CLOCK
spt 5f-.LPG0(%r13)
mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13)
spt 6f-.LPG0(%r13)
mvc __LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13)
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
#ifndef CONFIG_MARCH_G5
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
.insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
jz 0f
la %r0,0
la %r0,1
.insn s,0xb2b00000,__LC_STFL_FAC_LIST # store facility list extended
0: l %r0,__LC_STFL_FAC_LIST
n %r0,2f+8-.LPG0(%r13)
cl %r0,2f+8-.LPG0(%r13)
jne 1f
l %r0,__LC_STFL_FAC_LIST+4
n %r0,2f+12-.LPG0(%r13)
cl %r0,2f+12-.LPG0(%r13)
je 3f
1: l %r15,.Lstack-.LPG0(%r13)
# verify if all required facilities are supported by the machine
0: la %r1,__LC_STFL_FAC_LIST
la %r2,3f+8-.LPG0(%r13)
l %r3,0(%r2)
1: l %r0,0(%r1)
n %r0,4(%r2)
cl %r0,4(%r2)
jne 2f
la %r1,4(%r1)
la %r2,4(%r2)
ahi %r3,-1
jnz 1b
j 4f
2: l %r15,.Lstack-.LPG0(%r13)
ahi %r15,-96
la %r2,.Lals_string-.LPG0(%r13)
l %r3,.Lsclp_print-.LPG0(%r13)
basr %r14,%r3
lpsw 2f-.LPG0(%r13) # machine type not good enough, crash
lpsw 3f-.LPG0(%r13) # machine type not good enough, crash
.Lals_string:
.asciz "The Linux kernel requires more recent processor hardware"
.Lsclp_print:
.long _sclp_print_early
.Lstack:
.long 0x8000 + (1<<(PAGE_SHIFT+THREAD_ORDER))
.align 16
2: .long 0x000a0000,0x8badcccc
3: .long 0x000a0000,0x8badcccc

# List of facilities that are required. If not all facilities are present
# the kernel will crash. Format is number of facility words with bits set,
# followed by the facility words.

#if defined(CONFIG_64BIT)
#if defined(CONFIG_MARCH_Z196)
.long 0xc100efe3, 0xf46c0000
#if defined(CONFIG_MARCH_ZEC12)
.long 3, 0xc100efe3, 0xf46ce000, 0x00400000
#elif defined(CONFIG_MARCH_Z196)
.long 2, 0xc100efe3, 0xf46c0000
#elif defined(CONFIG_MARCH_Z10)
.long 0xc100efe3, 0xf0680000
.long 2, 0xc100efe3, 0xf0680000
#elif defined(CONFIG_MARCH_Z9_109)
.long 0xc100efc3, 0x00000000
.long 1, 0xc100efc3
#elif defined(CONFIG_MARCH_Z990)
.long 0xc0002000, 0x00000000
.long 1, 0xc0002000
#elif defined(CONFIG_MARCH_Z900)
.long 0xc0000000, 0x00000000
.long 1, 0xc0000000
#endif
#else
#if defined(CONFIG_MARCH_Z196)
.long 0x8100c880, 0x00000000
#if defined(CONFIG_MARCH_ZEC12)
.long 1, 0x8100c880
#elif defined(CONFIG_MARCH_Z196)
.long 1, 0x8100c880
#elif defined(CONFIG_MARCH_Z10)
.long 0x8100c880, 0x00000000
.long 1, 0x8100c880
#elif defined(CONFIG_MARCH_Z9_109)
.long 0x8100c880, 0x00000000
.long 1, 0x8100c880
#elif defined(CONFIG_MARCH_Z990)
.long 0x80002000, 0x00000000
.long 1, 0x80002000
#elif defined(CONFIG_MARCH_Z900)
.long 0x80000000, 0x00000000
.long 1, 0x80000000
#endif
#endif
3:
4:
#endif

#ifdef CONFIG_64BIT
Expand All @@ -459,14 +473,14 @@ ENTRY(startup_kdump)
jg startup_continue
#else
/* Continue with 31bit startup code in head31.S */
l %r13,4f-.LPG0(%r13)
l %r13,5f-.LPG0(%r13)
b 0(%r13)
.align 8
4: .long startup_continue
5: .long startup_continue
#endif

.align 8
5: .long 0x7fffffff,0xffffffff
6: .long 0x7fffffff,0xffffffff

#include "head_kdump.S"

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,9 @@ static void __init setup_hwcaps(void)
case 0x2818:
strcpy(elf_platform, "z196");
break;
case 0x2827:
strcpy(elf_platform, "zEC12");
break;
}
}

Expand Down

0 comments on commit 7f6496d

Please sign in to comment.