ia64/xen-unstable

view linux-2.6-xen-sparse/include/xen/cpu_hotplug.h @ 14227:29d4bca7a503

linux: Some save/restore simplifications and cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Fri Mar 02 23:01:36 2007 +0000 (2007-03-02)
parents 3ac19fda0bc2
children
line source
1 #ifndef __XEN_CPU_HOTPLUG_H__
2 #define __XEN_CPU_HOTPLUG_H__
4 #include <linux/kernel.h>
5 #include <linux/cpumask.h>
7 #if defined(CONFIG_X86) && defined(CONFIG_SMP)
8 extern cpumask_t cpu_initialized_map;
9 #define cpu_set_initialized(cpu) cpu_set(cpu, cpu_initialized_map)
10 #else
11 #define cpu_set_initialized(cpu) ((void)0)
12 #endif
14 #if defined(CONFIG_HOTPLUG_CPU)
16 int cpu_up_check(unsigned int cpu);
17 void init_xenbus_allowed_cpumask(void);
18 int smp_suspend(void);
19 void smp_resume(void);
21 void cpu_bringup(void);
23 #else /* !defined(CONFIG_HOTPLUG_CPU) */
25 #define cpu_up_check(cpu) (0)
26 #define init_xenbus_allowed_cpumask() ((void)0)
28 static inline int smp_suspend(void)
29 {
30 if (num_online_cpus() > 1) {
31 printk(KERN_WARNING "Can't suspend SMP guests "
32 "without CONFIG_HOTPLUG_CPU\n");
33 return -EOPNOTSUPP;
34 }
35 return 0;
36 }
38 static inline void smp_resume(void)
39 {
40 }
42 #endif /* !defined(CONFIG_HOTPLUG_CPU) */
44 #endif /* __XEN_CPU_HOTPLUG_H__ */