summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/early.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2017-03-11 12:22:11 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-03-22 08:29:11 +0100
commit2f8876f98447ccbddb5bccc8f74ee20a69e83a3e (patch)
treea86ecf3e5104e23c8aed77b9a87ad340e38d9210 /arch/s390/kernel/early.c
parentd2f039742537c4aec6488fa4de0c91a641210fd9 (diff)
downloadlinux-2f8876f98447ccbddb5bccc8f74ee20a69e83a3e.tar.gz
linux-2f8876f98447ccbddb5bccc8f74ee20a69e83a3e.tar.bz2
linux-2f8876f98447ccbddb5bccc8f74ee20a69e83a3e.zip
s390/dump_stack: use control program identification string
If running within a level 3 hypervisor, the hypervisor provides a SYSIB block which contains a control program indentifier string. Use this string instead of the simple KVM and z/VM strings only. In case of z/VM this provides addtional information: the z/VM version. The new string looks similar to this: Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r--arch/s390/kernel/early.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 914f273b1983..251391e3f8bc 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -252,7 +252,8 @@ static inline void strim_all(char *str)
static noinline __init void setup_arch_string(void)
{
struct sysinfo_1_1_1 *mach = (struct sysinfo_1_1_1 *)&sysinfo_page;
- char mstr[80];
+ struct sysinfo_3_2_2 *vm = (struct sysinfo_3_2_2 *)&sysinfo_page;
+ char mstr[80], hvstr[17];
if (stsi(mach, 1, 1, 1))
return;
@@ -264,10 +265,17 @@ static noinline __init void setup_arch_string(void)
mach->manufacturer, mach->type,
mach->model, mach->model_capacity);
strim_all(mstr);
- dump_stack_set_arch_desc("%s (%s)", mstr,
- MACHINE_IS_LPAR ? "LPAR" :
- MACHINE_IS_VM ? "z/VM" :
- MACHINE_IS_KVM ? "KVM" : "unknown");
+ if (stsi(vm, 3, 2, 2) == 0 && vm->count) {
+ EBCASC(vm->vm[0].cpi, sizeof(vm->vm[0].cpi));
+ sprintf(hvstr, "%-16.16s", vm->vm[0].cpi);
+ strim_all(hvstr);
+ } else {
+ sprintf(hvstr, "%s",
+ MACHINE_IS_LPAR ? "LPAR" :
+ MACHINE_IS_VM ? "z/VM" :
+ MACHINE_IS_KVM ? "KVM" : "unknown");
+ }
+ dump_stack_set_arch_desc("%s (%s)", mstr, hvstr);
}
static __init void setup_topology(void)