Merge tag 'pm+acpi-4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux/fpc-iii.git] / arch / s390 / include / asm / sysinfo.h
blobf7054a892d9e921eef2cbc896c420b9c562c3188
1 /*
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 {
21 unsigned char p:1;
22 unsigned char :6;
23 unsigned char t:1;
24 unsigned char :8;
25 unsigned char ccr;
26 unsigned char cai;
27 char reserved_0[28];
28 char manufacturer[16];
29 char type[4];
30 char reserved_1[12];
31 char model_capacity[16];
32 char sequence[16];
33 char plant[4];
34 char model[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];
42 unsigned int ncr;
43 unsigned int npr;
44 unsigned int ntr;
47 struct sysinfo_1_2_1 {
48 char reserved_0[80];
49 char sequence[16];
50 char plant[4];
51 char reserved_1[2];
52 unsigned short cpu_address;
55 struct sysinfo_1_2_2 {
56 char format;
57 char reserved_0[1];
58 unsigned short acc_offset;
59 char reserved_1[20];
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 {
76 char reserved_0[80];
77 char sequence[16];
78 char plant[4];
79 unsigned short cpu_id;
80 unsigned short cpu_address;
83 struct sysinfo_2_2_2 {
84 char reserved_0[32];
85 unsigned short lpar_number;
86 char reserved_1;
87 unsigned char characteristics;
88 unsigned short cpus_total;
89 unsigned short cpus_configured;
90 unsigned short cpus_standby;
91 unsigned short cpus_reserved;
92 char name[8];
93 unsigned int caf;
94 char reserved_2[8];
95 unsigned char mt_installed;
96 unsigned char mt_general;
97 unsigned char mt_psmtid;
98 char reserved_3[5];
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 {
108 char reserved_0[31];
109 unsigned char :4;
110 unsigned char count:4;
111 struct {
112 char reserved_0[4];
113 unsigned short cpus_total;
114 unsigned short cpus_configured;
115 unsigned short cpus_standby;
116 unsigned short cpus_reserved;
117 char name[8];
118 unsigned int caf;
119 char cpi[16];
120 char reserved_1[3];
121 char ext_name_encoding;
122 unsigned int reserved_2;
123 uuid_be uuid;
124 } vm[8];
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 {
135 unsigned char nl;
136 unsigned char reserved0[3];
137 unsigned char :6;
138 unsigned char pp:2;
139 unsigned char reserved1;
140 unsigned short origin;
141 unsigned long mask[TOPOLOGY_CORE_BITS / BITS_PER_LONG];
144 struct topology_container {
145 unsigned char nl;
146 unsigned char reserved[6];
147 unsigned char id;
150 union topology_entry {
151 unsigned char nl;
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;
161 unsigned char mnest;
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 */