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
;
60 unsigned int nominal_cap
;
61 unsigned int secondary_cap
;
62 unsigned int capability
;
63 unsigned short cpus_total
;
64 unsigned short cpus_configured
;
65 unsigned short cpus_standby
;
66 unsigned short cpus_reserved
;
67 unsigned short adjustment
[0];
70 struct sysinfo_1_2_2_extension
{
71 unsigned int alt_capability
;
72 unsigned short alt_adjustment
[0];
75 struct sysinfo_2_2_1
{
79 unsigned short cpu_id
;
80 unsigned short cpu_address
;
83 struct sysinfo_2_2_2
{
85 unsigned short lpar_number
;
87 unsigned char characteristics
;
88 unsigned short cpus_total
;
89 unsigned short cpus_configured
;
90 unsigned short cpus_standby
;
91 unsigned short cpus_reserved
;
95 unsigned char mt_installed
;
96 unsigned char mt_general
;
97 unsigned char mt_psmtid
;
99 unsigned short cpus_dedicated
;
100 unsigned short cpus_shared
;
103 #define LPAR_CHAR_DEDICATED (1 << 7)
104 #define LPAR_CHAR_SHARED (1 << 6)
105 #define LPAR_CHAR_LIMITED (1 << 5)
107 struct sysinfo_3_2_2
{
110 unsigned char count
:4;
113 unsigned short cpus_total
;
114 unsigned short cpus_configured
;
115 unsigned short cpus_standby
;
116 unsigned short cpus_reserved
;
121 char ext_name_encoding
;
122 unsigned int reserved_2
;
125 char reserved_3
[1504];
126 char ext_names
[8][256];
129 extern int topology_max_mnest
;
131 #define TOPOLOGY_CORE_BITS 64
132 #define TOPOLOGY_NR_MAG 6
134 struct topology_core
{
136 unsigned char reserved0
[3];
139 unsigned char reserved1
;
140 unsigned short origin
;
141 unsigned long mask
[TOPOLOGY_CORE_BITS
/ BITS_PER_LONG
];
144 struct topology_container
{
146 unsigned char reserved
[6];
150 union topology_entry
{
152 struct topology_core cpu
;
153 struct topology_container container
;
156 struct sysinfo_15_1_x
{
157 unsigned char reserved0
[2];
158 unsigned short length
;
159 unsigned char mag
[TOPOLOGY_NR_MAG
];
160 unsigned char reserved1
;
162 unsigned char reserved2
[4];
163 union topology_entry tle
[0];
166 int stsi(void *sysinfo
, int fc
, int sel1
, int sel2
);
169 * Service level reporting interface.
171 struct service_level
{
172 struct list_head list
;
173 void (*seq_print
)(struct seq_file
*, struct service_level
*);
176 int register_service_level(struct service_level
*);
177 int unregister_service_level(struct service_level
*);
179 #endif /* __ASM_S390_SYSINFO_H */