- Update Xen patches to 3.3-rc5 and c/s 1157.
[linux-flexiantxendom0-3.2.10.git] / include / xen / cpu_hotplug.h
1 #ifndef __XEN_CPU_HOTPLUG_H__
2 #define __XEN_CPU_HOTPLUG_H__
3
4 #include <linux/kernel.h>
5 #include <linux/cpumask.h>
6
7 #if defined(CONFIG_X86) && defined(CONFIG_SMP)
8 extern cpumask_var_t vcpu_initialized_mask;
9 #endif
10
11 #if defined(CONFIG_HOTPLUG_CPU)
12
13 int cpu_up_check(unsigned int cpu);
14 void init_xenbus_allowed_cpumask(void);
15 int smp_suspend(void);
16 void smp_resume(void);
17
18 #else /* !defined(CONFIG_HOTPLUG_CPU) */
19
20 #define cpu_up_check(cpu)               (0)
21 #define init_xenbus_allowed_cpumask()   ((void)0)
22
23 static inline int smp_suspend(void)
24 {
25         if (num_online_cpus() > 1) {
26                 pr_warning("Can't suspend SMP guests without"
27                            " CONFIG_HOTPLUG_CPU\n");
28                 return -EOPNOTSUPP;
29         }
30         return 0;
31 }
32
33 static inline void smp_resume(void)
34 {
35 }
36
37 #endif /* !defined(CONFIG_HOTPLUG_CPU) */
38
39 #endif /* __XEN_CPU_HOTPLUG_H__ */