Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.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_HOTPLUG_CPU)
8
9 #if defined(CONFIG_X86)
10 void cpu_initialize_context(unsigned int cpu);
11 #else
12 #define cpu_initialize_context(cpu)     ((void)0)
13 #endif
14
15 int cpu_up_check(unsigned int cpu);
16 void init_xenbus_allowed_cpumask(void);
17 int smp_suspend(void);
18 void smp_resume(void);
19
20 void cpu_bringup(void);
21
22 #else /* !defined(CONFIG_HOTPLUG_CPU) */
23
24 #define cpu_up_check(cpu)               (0)
25 #define init_xenbus_allowed_cpumask()   ((void)0)
26
27 static inline int smp_suspend(void)
28 {
29         if (num_online_cpus() > 1) {
30                 printk(KERN_WARNING "Can't suspend SMP guests "
31                        "without CONFIG_HOTPLUG_CPU\n");
32                 return -EOPNOTSUPP;
33         }
34         return 0;
35 }
36
37 static inline void smp_resume(void)
38 {
39 }
40
41 #endif /* !defined(CONFIG_HOTPLUG_CPU) */
42
43 #endif /* __XEN_CPU_HOTPLUG_H__ */