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>
19 struct sysinfo_1_1_1
{
27 char manufacturer
[16];
30 char model_capacity
[16];
34 char model_perm_cap
[16];
35 char model_temp_cap
[16];
36 unsigned int model_cap_rating
;
37 unsigned int model_perm_cap_rating
;
38 unsigned int model_temp_cap_rating
;
39 unsigned char typepct
[5];
40 unsigned char reserved_2
[3];
46 struct sysinfo_1_2_1
{
51 unsigned short cpu_address
;
54 struct sysinfo_1_2_2
{
57 unsigned short acc_offset
;
59 unsigned int nominal_cap
;
60 unsigned int secondary_cap
;
61 unsigned int capability
;
62 unsigned short cpus_total
;
63 unsigned short cpus_configured
;
64 unsigned short cpus_standby
;
65 unsigned short cpus_reserved
;
66 unsigned short adjustment
[0];
69 struct sysinfo_1_2_2_extension
{
70 unsigned int alt_capability
;
71 unsigned short alt_adjustment
[0];
74 struct sysinfo_2_2_1
{
78 unsigned short cpu_id
;
79 unsigned short cpu_address
;
82 struct sysinfo_2_2_2
{
84 unsigned short lpar_number
;
86 unsigned char characteristics
;
87 unsigned short cpus_total
;
88 unsigned short cpus_configured
;
89 unsigned short cpus_standby
;
90 unsigned short cpus_reserved
;
94 unsigned short cpus_dedicated
;
95 unsigned short cpus_shared
;
98 #define LPAR_CHAR_DEDICATED (1 << 7)
99 #define LPAR_CHAR_SHARED (1 << 6)
100 #define LPAR_CHAR_LIMITED (1 << 5)
102 struct sysinfo_3_2_2
{
105 unsigned char count
:4;
108 unsigned short cpus_total
;
109 unsigned short cpus_configured
;
110 unsigned short cpus_standby
;
111 unsigned short cpus_reserved
;
118 char reserved_544
[3552];
121 extern int topology_max_mnest
;
123 #define TOPOLOGY_CPU_BITS 64
124 #define TOPOLOGY_NR_MAG 6
126 struct topology_cpu
{
127 unsigned char reserved0
[4];
130 unsigned char reserved1
;
131 unsigned short origin
;
132 unsigned long mask
[TOPOLOGY_CPU_BITS
/ BITS_PER_LONG
];
135 struct topology_container
{
136 unsigned char reserved
[7];
140 union topology_entry
{
142 struct topology_cpu cpu
;
143 struct topology_container container
;
146 struct sysinfo_15_1_x
{
147 unsigned char reserved0
[2];
148 unsigned short length
;
149 unsigned char mag
[TOPOLOGY_NR_MAG
];
150 unsigned char reserved1
;
152 unsigned char reserved2
[4];
153 union topology_entry tle
[0];
156 int stsi(void *sysinfo
, int fc
, int sel1
, int sel2
);
159 * Service level reporting interface.
161 struct service_level
{
162 struct list_head list
;
163 void (*seq_print
)(struct seq_file
*, struct service_level
*);
166 int register_service_level(struct service_level
*);
167 int unregister_service_level(struct service_level
*);
169 #endif /* __ASM_S390_SYSINFO_H */