diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-03 08:05:05 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:45:07 -0400 |
commit | 25502f0015a8d6dd4bb34336ddb3eac6b1a55317 (patch) | |
tree | 10da0b56de089c25ebe6ca991828e32f566154ce | |
parent | 0facaa170a6a0255092d3b32325a15672465ac4c (diff) |
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 @@ | |||
17 | #include <asm/bitsperlong.h> | 17 | #include <asm/bitsperlong.h> |
18 | 18 | ||
19 | struct sysinfo_1_1_1 { | 19 | struct sysinfo_1_1_1 { |
20 | unsigned short :16; | 20 | unsigned char p:1; |
21 | unsigned char :6; | ||
22 | unsigned char t:1; | ||
23 | unsigned char :8; | ||
21 | unsigned char ccr; | 24 | unsigned char ccr; |
22 | unsigned char cai; | 25 | unsigned char cai; |
23 | char reserved_0[28]; | 26 | char reserved_0[28]; |
@@ -30,9 +33,14 @@ struct sysinfo_1_1_1 { | |||
30 | char model[16]; | 33 | char model[16]; |
31 | char model_perm_cap[16]; | 34 | char model_perm_cap[16]; |
32 | char model_temp_cap[16]; | 35 | char model_temp_cap[16]; |
33 | char model_cap_rating[4]; | 36 | unsigned int model_cap_rating; |
34 | char model_perm_cap_rating[4]; | 37 | unsigned int model_perm_cap_rating; |
35 | char model_temp_cap_rating[4]; | 38 | unsigned int model_temp_cap_rating; |
39 | unsigned char typepct[5]; | ||
40 | unsigned char reserved_2[3]; | ||
41 | unsigned int ncr; | ||
42 | unsigned int npr; | ||
43 | unsigned int ntr; | ||
36 | }; | 44 | }; |
37 | 45 | ||
38 | struct sysinfo_1_2_1 { | 46 | struct sysinfo_1_2_1 { |
@@ -47,8 +55,9 @@ struct sysinfo_1_2_2 { | |||
47 | char format; | 55 | char format; |
48 | char reserved_0[1]; | 56 | char reserved_0[1]; |
49 | unsigned short acc_offset; | 57 | unsigned short acc_offset; |
50 | char reserved_1[24]; | 58 | char reserved_1[20]; |
51 | unsigned int secondary_capability; | 59 | unsigned int nominal_cap; |
60 | unsigned int secondary_cap; | ||
52 | unsigned int capability; | 61 | unsigned int capability; |
53 | unsigned short cpus_total; | 62 | unsigned short cpus_total; |
54 | unsigned short cpus_configured; | 63 | 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) | |||
31 | 31 | ||
32 | static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info) | 32 | static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info) |
33 | { | 33 | { |
34 | int i; | ||
35 | |||
34 | if (stsi(info, 1, 1, 1) == -ENOSYS) | 36 | if (stsi(info, 1, 1, 1) == -ENOSYS) |
35 | return; | 37 | return; |
36 | EBCASC(info->manufacturer, sizeof(info->manufacturer)); | 38 | 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) | |||
57 | seq_printf(m, "Sequence Code: %-16.16s\n", info->sequence); | 59 | seq_printf(m, "Sequence Code: %-16.16s\n", info->sequence); |
58 | seq_printf(m, "Plant: %-4.4s\n", info->plant); | 60 | seq_printf(m, "Plant: %-4.4s\n", info->plant); |
59 | seq_printf(m, "Model Capacity: %-16.16s %08u\n", | 61 | seq_printf(m, "Model Capacity: %-16.16s %08u\n", |
60 | info->model_capacity, *(u32 *) info->model_cap_rating); | 62 | info->model_capacity, info->model_cap_rating); |
61 | if (info->model_perm_cap[0] != '\0') | 63 | if (info->model_perm_cap_rating) |
62 | seq_printf(m, "Model Perm. Capacity: %-16.16s %08u\n", | 64 | seq_printf(m, "Model Perm. Capacity: %-16.16s %08u\n", |
63 | info->model_perm_cap, | 65 | info->model_perm_cap, |
64 | *(u32 *) info->model_perm_cap_rating); | 66 | info->model_perm_cap_rating); |
65 | if (info->model_temp_cap[0] != '\0') | 67 | if (info->model_temp_cap_rating) |
66 | seq_printf(m, "Model Temp. Capacity: %-16.16s %08u\n", | 68 | seq_printf(m, "Model Temp. Capacity: %-16.16s %08u\n", |
67 | info->model_temp_cap, | 69 | info->model_temp_cap, |
68 | *(u32 *) info->model_temp_cap_rating); | 70 | info->model_temp_cap_rating); |
71 | if (info->ncr) | ||
72 | seq_printf(m, "Nominal Cap. Rating: %08u\n", info->ncr); | ||
73 | if (info->npr) | ||
74 | seq_printf(m, "Nominal Perm. Rating: %08u\n", info->npr); | ||
75 | if (info->ntr) | ||
76 | seq_printf(m, "Nominal Temp. Rating: %08u\n", info->ntr); | ||
69 | if (info->cai) { | 77 | if (info->cai) { |
70 | seq_printf(m, "Capacity Adj. Ind.: %d\n", info->cai); | 78 | seq_printf(m, "Capacity Adj. Ind.: %d\n", info->cai); |
71 | seq_printf(m, "Capacity Ch. Reason: %d\n", info->ccr); | 79 | seq_printf(m, "Capacity Ch. Reason: %d\n", info->ccr); |
80 | seq_printf(m, "Capacity Transient: %d\n", info->t); | ||
81 | } | ||
82 | if (info->p) { | ||
83 | for (i = 1; i <= ARRAY_SIZE(info->typepct); i++) { | ||
84 | seq_printf(m, "Type %d Percentage: %d\n", | ||
85 | i, info->typepct[i - 1]); | ||
86 | } | ||
72 | } | 87 | } |
73 | } | 88 | } |
74 | 89 | ||
@@ -128,6 +143,10 @@ static void stsi_1_2_2(struct seq_file *m, struct sysinfo_1_2_2 *info) | |||
128 | if (info->format == 1) | 143 | if (info->format == 1) |
129 | seq_printf(m, " %u", ext->alt_capability); | 144 | seq_printf(m, " %u", ext->alt_capability); |
130 | seq_putc(m, '\n'); | 145 | seq_putc(m, '\n'); |
146 | if (info->nominal_cap) | ||
147 | seq_printf(m, "Nominal Capability: %d\n", info->nominal_cap); | ||
148 | if (info->secondary_cap) | ||
149 | seq_printf(m, "Secondary Capability: %d\n", info->secondary_cap); | ||
131 | for (i = 2; i <= info->cpus_total; i++) { | 150 | for (i = 2; i <= info->cpus_total; i++) { |
132 | seq_printf(m, "Adjustment %02d-way: %u", | 151 | seq_printf(m, "Adjustment %02d-way: %u", |
133 | i, info->adjustment[i-2]); | 152 | 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) | |||
135 | seq_printf(m, " %u", ext->alt_adjustment[i-2]); | 154 | seq_printf(m, " %u", ext->alt_adjustment[i-2]); |
136 | seq_putc(m, '\n'); | 155 | seq_putc(m, '\n'); |
137 | } | 156 | } |
138 | if (info->secondary_capability) | ||
139 | seq_printf(m, "Secondary Capability: %d\n", | ||
140 | info->secondary_capability); | ||
141 | } | 157 | } |
142 | 158 | ||
143 | static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info) | 159 | static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info) |