sysinfo.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. * definition for store system information stsi
  3. *
  4. * Copyright IBM Corp. 2001, 2008
  5. *
  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.
  9. *
  10. * Author(s): Ulrich Weigand <weigand@de.ibm.com>
  11. * Christian Borntraeger <borntraeger@de.ibm.com>
  12. */
  13. #ifndef __ASM_S390_SYSINFO_H
  14. #define __ASM_S390_SYSINFO_H
  15. #include <asm/bitsperlong.h>
  16. #include <linux/uuid.h>
  17. struct sysinfo_1_1_1 {
  18. unsigned char p:1;
  19. unsigned char :6;
  20. unsigned char t:1;
  21. unsigned char :8;
  22. unsigned char ccr;
  23. unsigned char cai;
  24. char reserved_0[28];
  25. char manufacturer[16];
  26. char type[4];
  27. char reserved_1[12];
  28. char model_capacity[16];
  29. char sequence[16];
  30. char plant[4];
  31. char model[16];
  32. char model_perm_cap[16];
  33. char model_temp_cap[16];
  34. unsigned int model_cap_rating;
  35. unsigned int model_perm_cap_rating;
  36. unsigned int model_temp_cap_rating;
  37. unsigned char typepct[5];
  38. unsigned char reserved_2[3];
  39. unsigned int ncr;
  40. unsigned int npr;
  41. unsigned int ntr;
  42. };
  43. struct sysinfo_1_2_1 {
  44. char reserved_0[80];
  45. char sequence[16];
  46. char plant[4];
  47. char reserved_1[2];
  48. unsigned short cpu_address;
  49. };
  50. struct sysinfo_1_2_2 {
  51. char format;
  52. char reserved_0[1];
  53. unsigned short acc_offset;
  54. unsigned char mt_installed :1;
  55. unsigned char :2;
  56. unsigned char mt_stid :5;
  57. unsigned char :3;
  58. unsigned char mt_gtid :5;
  59. char reserved_1[18];
  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];
  68. };
  69. struct sysinfo_1_2_2_extension {
  70. unsigned int alt_capability;
  71. unsigned short alt_adjustment[0];
  72. };
  73. struct sysinfo_2_2_1 {
  74. char reserved_0[80];
  75. char sequence[16];
  76. char plant[4];
  77. unsigned short cpu_id;
  78. unsigned short cpu_address;
  79. };
  80. struct sysinfo_2_2_2 {
  81. char reserved_0[32];
  82. unsigned short lpar_number;
  83. char reserved_1;
  84. unsigned char characteristics;
  85. unsigned short cpus_total;
  86. unsigned short cpus_configured;
  87. unsigned short cpus_standby;
  88. unsigned short cpus_reserved;
  89. char name[8];
  90. unsigned int caf;
  91. char reserved_2[8];
  92. unsigned char mt_installed :1;
  93. unsigned char :2;
  94. unsigned char mt_stid :5;
  95. unsigned char :3;
  96. unsigned char mt_gtid :5;
  97. unsigned char :3;
  98. unsigned char mt_psmtid :5;
  99. char reserved_3[5];
  100. unsigned short cpus_dedicated;
  101. unsigned short cpus_shared;
  102. };
  103. #define LPAR_CHAR_DEDICATED (1 << 7)
  104. #define LPAR_CHAR_SHARED (1 << 6)
  105. #define LPAR_CHAR_LIMITED (1 << 5)
  106. struct sysinfo_3_2_2 {
  107. char reserved_0[31];
  108. unsigned char :4;
  109. unsigned char count:4;
  110. struct {
  111. char reserved_0[4];
  112. unsigned short cpus_total;
  113. unsigned short cpus_configured;
  114. unsigned short cpus_standby;
  115. unsigned short cpus_reserved;
  116. char name[8];
  117. unsigned int caf;
  118. char cpi[16];
  119. char reserved_1[3];
  120. char ext_name_encoding;
  121. unsigned int reserved_2;
  122. uuid_be uuid;
  123. } vm[8];
  124. char reserved_3[1504];
  125. char ext_names[8][256];
  126. };
  127. extern int topology_max_mnest;
  128. #define TOPOLOGY_CORE_BITS 64
  129. #define TOPOLOGY_NR_MAG 6
  130. struct topology_core {
  131. unsigned char nl;
  132. unsigned char reserved0[3];
  133. unsigned char :6;
  134. unsigned char pp:2;
  135. unsigned char reserved1;
  136. unsigned short origin;
  137. unsigned long mask[TOPOLOGY_CORE_BITS / BITS_PER_LONG];
  138. };
  139. struct topology_container {
  140. unsigned char nl;
  141. unsigned char reserved[6];
  142. unsigned char id;
  143. };
  144. union topology_entry {
  145. unsigned char nl;
  146. struct topology_core cpu;
  147. struct topology_container container;
  148. };
  149. struct sysinfo_15_1_x {
  150. unsigned char reserved0[2];
  151. unsigned short length;
  152. unsigned char mag[TOPOLOGY_NR_MAG];
  153. unsigned char reserved1;
  154. unsigned char mnest;
  155. unsigned char reserved2[4];
  156. union topology_entry tle[0];
  157. };
  158. int stsi(void *sysinfo, int fc, int sel1, int sel2);
  159. /*
  160. * Service level reporting interface.
  161. */
  162. struct service_level {
  163. struct list_head list;
  164. void (*seq_print)(struct seq_file *, struct service_level *);
  165. };
  166. int register_service_level(struct service_level *);
  167. int unregister_service_level(struct service_level *);
  168. #endif /* __ASM_S390_SYSINFO_H */