2 * definition for store system information stsi
4 * Copyright IBM Corp. 2001, 2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
10 * Author(s): Ulrich Weigand <weigand@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com>
14 #ifndef __ASM_S390_SYSINFO_H
15 #define __ASM_S390_SYSINFO_H
17 #include <asm/bitsperlong.h>
18 #include <linux/uuid.h>
20 struct sysinfo_1_1_1
{
28 char manufacturer
[16];
31 char model_capacity
[16];
35 char model_perm_cap
[16];
36 char model_temp_cap
[16];
37 unsigned int model_cap_rating
;
38 unsigned int model_perm_cap_rating
;
39 unsigned int model_temp_cap_rating
;
40 unsigned char typepct
[5];
41 unsigned char reserved_2
[3];
47 struct sysinfo_1_2_1
{
52 unsigned short cpu_address
;
55 struct sysinfo_1_2_2
{
58 unsigned short acc_offset
;
59 unsigned char mt_installed
:1;
61 unsigned char mt_stid
:5;
63 unsigned char mt_gtid
:5;
65 unsigned int nominal_cap
;
66 unsigned int secondary_cap
;
67 unsigned int capability
;
68 unsigned short cpus_total
;
69 unsigned short cpus_configured
;
70 unsigned short cpus_standby
;
71 unsigned short cpus_reserved
;
72 unsigned short adjustment
[0];
75 struct sysinfo_1_2_2_extension
{
76 unsigned int alt_capability
;
77 unsigned short alt_adjustment
[0];
80 struct sysinfo_2_2_1
{
84 unsigned short cpu_id
;
85 unsigned short cpu_address
;
88 struct sysinfo_2_2_2
{
90 unsigned short lpar_number
;
92 unsigned char characteristics
;
93 unsigned short cpus_total
;
94 unsigned short cpus_configured
;
95 unsigned short cpus_standby
;
96 unsigned short cpus_reserved
;
100 unsigned char mt_installed
:1;
102 unsigned char mt_stid
:5;
104 unsigned char mt_gtid
:5;
106 unsigned char mt_psmtid
:5;
108 unsigned short cpus_dedicated
;
109 unsigned short cpus_shared
;
113 char reserved_5
[160];
117 #define LPAR_CHAR_DEDICATED (1 << 7)
118 #define LPAR_CHAR_SHARED (1 << 6)
119 #define LPAR_CHAR_LIMITED (1 << 5)
121 struct sysinfo_3_2_2
{
124 unsigned char count
:4;
127 unsigned short cpus_total
;
128 unsigned short cpus_configured
;
129 unsigned short cpus_standby
;
130 unsigned short cpus_reserved
;
136 unsigned int reserved_2
;
139 char reserved_3
[1504];
140 char ext_names
[8][256];
143 extern int topology_max_mnest
;
146 * Returns the maximum nesting level supported by the cpu topology code.
147 * The current maximum level is 4 which is the drawer level.
149 static inline unsigned char topology_mnest_limit(void)
151 return min(topology_max_mnest
, 4);
154 #define TOPOLOGY_NR_MAG 6
156 struct topology_core
{
158 unsigned char reserved0
[3];
161 unsigned char reserved1
;
162 unsigned short origin
;
166 struct topology_container
{
168 unsigned char reserved
[6];
172 union topology_entry
{
174 struct topology_core cpu
;
175 struct topology_container container
;
178 struct sysinfo_15_1_x
{
179 unsigned char reserved0
[2];
180 unsigned short length
;
181 unsigned char mag
[TOPOLOGY_NR_MAG
];
182 unsigned char reserved1
;
184 unsigned char reserved2
[4];
185 union topology_entry tle
[0];
188 int stsi(void *sysinfo
, int fc
, int sel1
, int sel2
);
191 * Service level reporting interface.
193 struct service_level
{
194 struct list_head list
;
195 void (*seq_print
)(struct seq_file
*, struct service_level
*);
198 int register_service_level(struct service_level
*);
199 int unregister_service_level(struct service_level
*);
201 #endif /* __ASM_S390_SYSINFO_H */