diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-03 14:05:05 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 15:45:07 +0200 |
commit | 25502f0015a8d6dd4bb34336ddb3eac6b1a55317 (patch) | |
tree | 10da0b56de089c25ebe6ca991828e32f566154ce | |
parent | 0facaa170a6a0255092d3b32325a15672465ac4c (diff) | |
download | linux-stable-25502f0015a8d6dd4bb34336ddb3eac6b1a55317.tar.gz linux-stable-25502f0015a8d6dd4bb34336ddb3eac6b1a55317.tar.bz2 linux-stable-25502f0015a8d6dd4bb34336ddb3eac6b1a55317.zip |
s390/sysinfo: add additional z196 fields to output
Add a couple of missing fields that were introduced with z196.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 21 | ||||
-rw-r--r-- | arch/s390/kernel/sysinfo.c | 32 |
2 files changed, 39 insertions, 14 deletions
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 282ee36f6162..12e5256adca3 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h @@ -17,7 +17,10 @@ #include <asm/bitsperlong.h> struct sysinfo_1_1_1 { - unsigned short :16; + unsigned char p:1; + unsigned char :6; + unsigned char t:1; + unsigned char :8; unsigned char ccr; unsigned char cai; char reserved_0[28]; @@ -30,9 +33,14 @@ struct sysinfo_1_1_1 { char model[16]; char model_perm_cap[16]; char model_temp_cap[16]; - char model_cap_rating[4]; - char model_perm_cap_rating[4]; - char model_temp_cap_rating[4]; + unsigned int model_cap_rating; + unsigned int model_perm_cap_rating; + unsigned int model_temp_cap_rating; + unsigned char typepct[5]; + unsigned char reserved_2[3]; + unsigned int ncr; + unsigned int npr; + unsigned int ntr; }; struct sysinfo_1_2_1 { @@ -47,8 +55,9 @@ struct sysinfo_1_2_2 { char format; char reserved_0[1]; unsigned short acc_offset; - char reserved_1[24]; - unsigned int secondary_capability; + char reserved_1[20]; + unsigned int nominal_cap; + unsigned int secondary_cap; unsigned int capability; unsigned short cpus_total; unsigned short cpus_configured; diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c index d3b543c3617a..2249b0cf80ef 100644 --- a/arch/s390/kernel/sysinfo.c +++ b/arch/s390/kernel/sysinfo.c @@ -31,6 +31,8 @@ static inline int stsi_0(void) static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info) { + int i; + if (stsi(info, 1, 1, 1) == -ENOSYS) return; EBCASC(info->manufacturer, sizeof(info->manufacturer)); @@ -57,18 +59,31 @@ static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info) seq_printf(m, "Sequence Code: %-16.16s\n", info->sequence); seq_printf(m, "Plant: %-4.4s\n", info->plant); seq_printf(m, "Model Capacity: %-16.16s %08u\n", - info->model_capacity, *(u32 *) info->model_cap_rating); - if (info->model_perm_cap[0] != '\0') + info->model_capacity, info->model_cap_rating); + if (info->model_perm_cap_rating) seq_printf(m, "Model Perm. Capacity: %-16.16s %08u\n", info->model_perm_cap, - *(u32 *) info->model_perm_cap_rating); - if (info->model_temp_cap[0] != '\0') + info->model_perm_cap_rating); + if (info->model_temp_cap_rating) seq_printf(m, "Model Temp. Capacity: %-16.16s %08u\n", info->model_temp_cap, - *(u32 *) info->model_temp_cap_rating); + info->model_temp_cap_rating); + if (info->ncr) + seq_printf(m, "Nominal Cap. Rating: %08u\n", info->ncr); + if (info->npr) + seq_printf(m, "Nominal Perm. Rating: %08u\n", info->npr); + if (info->ntr) + seq_printf(m, "Nominal Temp. Rating: %08u\n", info->ntr); if (info->cai) { seq_printf(m, "Capacity Adj. Ind.: %d\n", info->cai); seq_printf(m, "Capacity Ch. Reason: %d\n", info->ccr); + seq_printf(m, "Capacity Transient: %d\n", info->t); + } + if (info->p) { + for (i = 1; i <= ARRAY_SIZE(info->typepct); i++) { + seq_printf(m, "Type %d Percentage: %d\n", + i, info->typepct[i - 1]); + } } } @@ -128,6 +143,10 @@ static void stsi_1_2_2(struct seq_file *m, struct sysinfo_1_2_2 *info) if (info->format == 1) seq_printf(m, " %u", ext->alt_capability); seq_putc(m, '\n'); + if (info->nominal_cap) + seq_printf(m, "Nominal Capability: %d\n", info->nominal_cap); + if (info->secondary_cap) + seq_printf(m, "Secondary Capability: %d\n", info->secondary_cap); for (i = 2; i <= info->cpus_total; i++) { seq_printf(m, "Adjustment %02d-way: %u", i, info->adjustment[i-2]); @@ -135,9 +154,6 @@ static void stsi_1_2_2(struct seq_file *m, struct sysinfo_1_2_2 *info) seq_printf(m, " %u", ext->alt_adjustment[i-2]); seq_putc(m, '\n'); } - if (info->secondary_capability) - seq_printf(m, "Secondary Capability: %d\n", - info->secondary_capability); } static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info) |