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 struct sysinfo_1_1_1
{
16 char manufacturer
[16];
19 char model_capacity
[16];
23 char model_perm_cap
[16];
24 char model_temp_cap
[16];
25 char model_cap_rating
[4];
26 char model_perm_cap_rating
[4];
27 char model_temp_cap_rating
[4];
30 struct sysinfo_1_2_1
{
35 unsigned short cpu_address
;
38 struct sysinfo_1_2_2
{
41 unsigned short acc_offset
;
43 unsigned int secondary_capability
;
44 unsigned int capability
;
45 unsigned short cpus_total
;
46 unsigned short cpus_configured
;
47 unsigned short cpus_standby
;
48 unsigned short cpus_reserved
;
49 unsigned short adjustment
[0];
52 struct sysinfo_1_2_2_extension
{
53 unsigned int alt_capability
;
54 unsigned short alt_adjustment
[0];
57 struct sysinfo_2_2_1
{
61 unsigned short cpu_id
;
62 unsigned short cpu_address
;
65 struct sysinfo_2_2_2
{
67 unsigned short lpar_number
;
69 unsigned char characteristics
;
70 unsigned short cpus_total
;
71 unsigned short cpus_configured
;
72 unsigned short cpus_standby
;
73 unsigned short cpus_reserved
;
77 unsigned short cpus_dedicated
;
78 unsigned short cpus_shared
;
81 #define LPAR_CHAR_DEDICATED (1 << 7)
82 #define LPAR_CHAR_SHARED (1 << 6)
83 #define LPAR_CHAR_LIMITED (1 << 5)
85 struct sysinfo_3_2_2
{
90 unsigned short cpus_total
;
91 unsigned short cpus_configured
;
92 unsigned short cpus_standby
;
93 unsigned short cpus_reserved
;
102 static inline int stsi(void *sysinfo
, int fc
, int sel1
, int sel2
)
104 register int r0
asm("0") = (fc
<< 28) | sel1
;
105 register int r1
asm("1") = sel2
;
113 : "+d" (r0
) : "d" (r1
), "a" (sysinfo
), "K" (-ENOSYS
)