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
{
24 char manufacturer
[16];
27 char model_capacity
[16];
31 char model_perm_cap
[16];
32 char model_temp_cap
[16];
33 char model_cap_rating
[4];
34 char model_perm_cap_rating
[4];
35 char model_temp_cap_rating
[4];
38 struct sysinfo_1_2_1
{
43 unsigned short cpu_address
;
46 struct sysinfo_1_2_2
{
49 unsigned short acc_offset
;
51 unsigned int secondary_capability
;
52 unsigned int capability
;
53 unsigned short cpus_total
;
54 unsigned short cpus_configured
;
55 unsigned short cpus_standby
;
56 unsigned short cpus_reserved
;
57 unsigned short adjustment
[0];
60 struct sysinfo_1_2_2_extension
{
61 unsigned int alt_capability
;
62 unsigned short alt_adjustment
[0];
65 struct sysinfo_2_2_1
{
69 unsigned short cpu_id
;
70 unsigned short cpu_address
;
73 struct sysinfo_2_2_2
{
75 unsigned short lpar_number
;
77 unsigned char characteristics
;
78 unsigned short cpus_total
;
79 unsigned short cpus_configured
;
80 unsigned short cpus_standby
;
81 unsigned short cpus_reserved
;
85 unsigned short cpus_dedicated
;
86 unsigned short cpus_shared
;
89 #define LPAR_CHAR_DEDICATED (1 << 7)
90 #define LPAR_CHAR_SHARED (1 << 6)
91 #define LPAR_CHAR_LIMITED (1 << 5)
93 struct sysinfo_3_2_2
{
96 unsigned char count
:4;
99 unsigned short cpus_total
;
100 unsigned short cpus_configured
;
101 unsigned short cpus_standby
;
102 unsigned short cpus_reserved
;
109 char reserved_544
[3552];
112 #define TOPOLOGY_CPU_BITS 64
113 #define TOPOLOGY_NR_MAG 6
115 struct topology_cpu
{
116 unsigned char reserved0
[4];
119 unsigned char reserved1
;
120 unsigned short origin
;
121 unsigned long mask
[TOPOLOGY_CPU_BITS
/ BITS_PER_LONG
];
124 struct topology_container
{
125 unsigned char reserved
[7];
129 union topology_entry
{
131 struct topology_cpu cpu
;
132 struct topology_container container
;
135 struct sysinfo_15_1_x
{
136 unsigned char reserved0
[2];
137 unsigned short length
;
138 unsigned char mag
[TOPOLOGY_NR_MAG
];
139 unsigned char reserved1
;
141 unsigned char reserved2
[4];
142 union topology_entry tle
[0];
145 static inline int stsi(void *sysinfo
, int fc
, int sel1
, int sel2
)
147 register int r0
asm("0") = (fc
<< 28) | sel1
;
148 register int r1
asm("1") = sel2
;
156 : "+d" (r0
) : "d" (r1
), "a" (sysinfo
), "K" (-ENOSYS
)
162 * Service level reporting interface.
164 struct service_level
{
165 struct list_head list
;
166 void (*seq_print
)(struct seq_file
*, struct service_level
*);
169 int register_service_level(struct service_level
*);
170 int unregister_service_level(struct service_level
*);
172 #endif /* __ASM_S390_SYSINFO_H */