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];
25 struct sysinfo_1_2_1 {
30 unsigned short cpu_address;
33 struct sysinfo_1_2_2 {
36 unsigned short acc_offset;
38 unsigned int secondary_capability;
39 unsigned int capability;
40 unsigned short cpus_total;
41 unsigned short cpus_configured;
42 unsigned short cpus_standby;
43 unsigned short cpus_reserved;
44 unsigned short adjustment[0];
47 struct sysinfo_1_2_2_extension {
48 unsigned int alt_capability;
49 unsigned short alt_adjustment[0];
52 struct sysinfo_2_2_1 {
56 unsigned short cpu_id;
57 unsigned short cpu_address;
60 struct sysinfo_2_2_2 {
62 unsigned short lpar_number;
64 unsigned char characteristics;
65 unsigned short cpus_total;
66 unsigned short cpus_configured;
67 unsigned short cpus_standby;
68 unsigned short cpus_reserved;
72 unsigned short cpus_dedicated;
73 unsigned short cpus_shared;
76 #define LPAR_CHAR_DEDICATED (1 << 7)
77 #define LPAR_CHAR_SHARED (1 << 6)
78 #define LPAR_CHAR_LIMITED (1 << 5)
80 struct sysinfo_3_2_2 {
85 unsigned short cpus_total;
86 unsigned short cpus_configured;
87 unsigned short cpus_standby;
88 unsigned short cpus_reserved;
97 static inline int stsi(void *sysinfo, int fc, int sel1, int sel2)
99 register int r0 asm("0") = (fc << 28) | sel1;
100 register int r1 asm("1") = sel2;
108 : "+d" (r0) : "d" (r1), "a" (sysinfo), "K" (-ENOSYS)