7 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <linux/slab.h>
16 #include <asm/sysinfo.h>
18 #include <asm/topology.h>
35 register int r0 asm(
"0") = (fc << 28) | sel1;
36 register int r1 asm(
"1") = sel2;
45 :
"+d" (
r0),
"+d" (rc)
50 return fc ? 0 : ((
unsigned int)
r0) >> 28;
58 if (
stsi(info, 1, 1, 1))
78 if (info->
model[0] !=
'\0')
83 seq_printf(m,
"Model Capacity: %-16.16s %08u\n",
86 seq_printf(m,
"Model Perm. Capacity: %-16.16s %08u\n",
90 seq_printf(m,
"Model Temp. Capacity: %-16.16s %08u\n",
102 seq_printf(m,
"Capacity Transient: %d\n", info->
t);
114 static int max_mnest;
126 #ifdef CONFIG_SCHED_MC
140 if (
stsi(info, 1, 2, 2))
176 if (
stsi(info, 2, 2, 2))
203 if (
stsi(info, 3, 2, 2))
205 for (i = 0; i < info->
count; i++) {
206 EBCASC(info->
vm[i].name,
sizeof(info->
vm[i].name));
207 EBCASC(info->
vm[i].cpi,
sizeof(info->
vm[i].cpi));
209 seq_printf(m,
"VM%02d Name: %-8.8s\n", i, info->
vm[i].name);
210 seq_printf(m,
"VM%02d Control Program: %-16.16s\n", i, info->
vm[i].cpi);
211 seq_printf(m,
"VM%02d Adjustment: %d\n", i, info->
vm[i].caf);
212 seq_printf(m,
"VM%02d CPUs Total: %d\n", i, info->
vm[i].cpus_total);
213 seq_printf(m,
"VM%02d CPUs Configured: %d\n", i, info->
vm[i].cpus_configured);
214 seq_printf(m,
"VM%02d CPUs Standby: %d\n", i, info->
vm[i].cpus_standby);
215 seq_printf(m,
"VM%02d CPUs Reserved: %d\n", i, info->
vm[i].cpus_reserved);
219 static int sysinfo_show(
struct seq_file *m,
void *
v)
230 stsi_15_1_x(m, info);
247 .open = sysinfo_open,
253 static int __init sysinfo_create_proc(
void)
255 proc_create(
"sysinfo", 0444,
NULL, &sysinfo_fops);
301 static void *service_level_start(
struct seq_file *m, loff_t *
pos)
307 static void *service_level_next(
struct seq_file *m,
void *
p, loff_t *
pos)
312 static void service_level_stop(
struct seq_file *m,
void *
p)
317 static int service_level_show(
struct seq_file *m,
void *
p)
327 .start = service_level_start,
328 .next = service_level_next,
329 .stop = service_level_stop,
330 .show = service_level_show
335 return seq_open(file, &service_level_seq_ops);
339 .open = service_level_open,
345 static void service_level_vm_print(
struct seq_file *m,
348 char *query_buffer, *
str;
353 cpcmd(
"QUERY CPLEVEL", query_buffer, 1024,
NULL);
354 str =
strchr(query_buffer,
'\n');
362 .seq_print = service_level_vm_print
365 static __init int create_proc_service_level(
void)
367 proc_create(
"service_levels", 0,
NULL, &service_level_ops);
380 const unsigned int fmil = 0x4b189680;
389 if (
stsi(info, 1, 2, 2) == 0) {