Full support for Ginger Console
[linux-ginger.git] / arch / s390 / include / asm / sysinfo.h
blob9d70057d828c604796082b21d61535eebcd19f87
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 struct sysinfo_1_1_1 {
18 char reserved_0[32];
19 char manufacturer[16];
20 char type[4];
21 char reserved_1[12];
22 char model_capacity[16];
23 char sequence[16];
24 char plant[4];
25 char model[16];
26 char model_perm_cap[16];
27 char model_temp_cap[16];
28 char model_cap_rating[4];
29 char model_perm_cap_rating[4];
30 char model_temp_cap_rating[4];
33 struct sysinfo_1_2_1 {
34 char reserved_0[80];
35 char sequence[16];
36 char plant[4];
37 char reserved_1[2];
38 unsigned short cpu_address;
41 struct sysinfo_1_2_2 {
42 char format;
43 char reserved_0[1];
44 unsigned short acc_offset;
45 char reserved_1[24];
46 unsigned int secondary_capability;
47 unsigned int capability;
48 unsigned short cpus_total;
49 unsigned short cpus_configured;
50 unsigned short cpus_standby;
51 unsigned short cpus_reserved;
52 unsigned short adjustment[0];
55 struct sysinfo_1_2_2_extension {
56 unsigned int alt_capability;
57 unsigned short alt_adjustment[0];
60 struct sysinfo_2_2_1 {
61 char reserved_0[80];
62 char sequence[16];
63 char plant[4];
64 unsigned short cpu_id;
65 unsigned short cpu_address;
68 struct sysinfo_2_2_2 {
69 char reserved_0[32];
70 unsigned short lpar_number;
71 char reserved_1;
72 unsigned char characteristics;
73 unsigned short cpus_total;
74 unsigned short cpus_configured;
75 unsigned short cpus_standby;
76 unsigned short cpus_reserved;
77 char name[8];
78 unsigned int caf;
79 char reserved_2[16];
80 unsigned short cpus_dedicated;
81 unsigned short cpus_shared;
84 #define LPAR_CHAR_DEDICATED (1 << 7)
85 #define LPAR_CHAR_SHARED (1 << 6)
86 #define LPAR_CHAR_LIMITED (1 << 5)
88 struct sysinfo_3_2_2 {
89 char reserved_0[31];
90 unsigned char count;
91 struct {
92 char reserved_0[4];
93 unsigned short cpus_total;
94 unsigned short cpus_configured;
95 unsigned short cpus_standby;
96 unsigned short cpus_reserved;
97 char name[8];
98 unsigned int caf;
99 char cpi[16];
100 char reserved_1[24];
102 } vm[8];
103 char reserved_544[3552];
106 static inline int stsi(void *sysinfo, int fc, int sel1, int sel2)
108 register int r0 asm("0") = (fc << 28) | sel1;
109 register int r1 asm("1") = sel2;
111 asm volatile(
112 " stsi 0(%2)\n"
113 "0: jz 2f\n"
114 "1: lhi %0,%3\n"
115 "2:\n"
116 EX_TABLE(0b, 1b)
117 : "+d" (r0) : "d" (r1), "a" (sysinfo), "K" (-ENOSYS)
118 : "cc", "memory");
119 return r0;
123 * Service level reporting interface.
125 struct service_level {
126 struct list_head list;
127 void (*seq_print)(struct seq_file *, struct service_level *);
130 int register_service_level(struct service_level *);
131 int unregister_service_level(struct service_level *);
133 #endif /* __ASM_S390_SYSINFO_H */