x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI
[cascardo/linux.git] / arch / x86 / include / asm / cpu.h
1 #ifndef _ASM_X86_CPU_H
2 #define _ASM_X86_CPU_H
3
4 #include <linux/device.h>
5 #include <linux/cpu.h>
6 #include <linux/topology.h>
7 #include <linux/nodemask.h>
8 #include <linux/percpu.h>
9
10 #ifdef CONFIG_SMP
11
12 extern void prefill_possible_map(void);
13
14 #else /* CONFIG_SMP */
15
16 static inline void prefill_possible_map(void) {}
17
18 #define cpu_physical_id(cpu)                    boot_cpu_physical_apicid
19 #define safe_smp_processor_id()                 0
20 #define stack_smp_processor_id()                0
21
22 #endif /* CONFIG_SMP */
23
24 struct x86_cpu {
25         struct cpu cpu;
26 };
27
28 #ifdef CONFIG_HOTPLUG_CPU
29 extern int arch_register_cpu(int num);
30 extern void arch_unregister_cpu(int);
31 extern void __cpuinit start_cpu0(void);
32 #endif
33
34 DECLARE_PER_CPU(int, cpu_state);
35
36 int mwait_usable(const struct cpuinfo_x86 *);
37
38 #endif /* _ASM_X86_CPU_H */