6 #include <asm/xen/hypervisor.h>
9 static void enable_hotplug_cpu(
int cpu)
12 arch_register_cpu(cpu);
17 static void disable_hotplug_cpu(
int cpu)
20 arch_unregister_cpu(cpu);
25 static int vcpu_online(
unsigned int cpu)
38 if (
strcmp(state,
"online") == 0)
40 else if (
strcmp(state,
"offline") == 0)
43 printk(
KERN_ERR "XENBUS: unknown state(%s) on CPU%d\n", state, cpu);
46 static void vcpu_hotplug(
unsigned int cpu)
51 switch (vcpu_online(cpu)) {
53 enable_hotplug_cpu(cpu);
57 disable_hotplug_cpu(cpu);
65 const char **vec,
unsigned int len)
71 cpustr =
strstr(node,
"cpu/");
73 sscanf(cpustr,
"cpu/%u", &cpu);
84 .callback = handle_vcpu_hotplug_event};
89 if (vcpu_online(cpu) == 0) {
98 static int __init setup_vcpu_hotplug_event(
void)