source: trunk/packages/xen-common/xen-common/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 945 bytes
Line 
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)
8extern 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
13
14#if defined(CONFIG_HOTPLUG_CPU)
15
16int cpu_up_check(unsigned int cpu);
17void init_xenbus_allowed_cpumask(void);
18int smp_suspend(void);
19void smp_resume(void);
20
21void cpu_bringup(void);
22
23#else /* !defined(CONFIG_HOTPLUG_CPU) */
24
25#define cpu_up_check(cpu)               (0)
26#define init_xenbus_allowed_cpumask()   ((void)0)
27
28static 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}
37
38static inline void smp_resume(void)
39{
40}
41
42#endif /* !defined(CONFIG_HOTPLUG_CPU) */
43
44#endif /* __XEN_CPU_HOTPLUG_H__ */
Note: See TracBrowser for help on using the repository browser.