blob: d2b12988d2ed19b355b09347582c81db15c41a3d [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_CPU_H
2#define _ASM_X86_CPU_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4#include <linux/device.h>
5#include <linux/cpu.h>
6#include <linux/topology.h>
7#include <linux/nodemask.h>
Zwane Mwaikambof3705132005-06-25 14:54:50 -07008#include <linux/percpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Jaswinder Singh Rajput6e5385d2009-01-07 18:11:35 +053010#ifdef CONFIG_SMP
11
12extern void prefill_possible_map(void);
13
14#else /* CONFIG_SMP */
15
16static inline void prefill_possible_map(void) {}
17
Jaswinder Singh Rajputaf8968a2009-01-07 21:37:33 +053018#define cpu_physical_id(cpu) boot_cpu_physical_apicid
Jaswinder Singh Rajput96b89dc2009-01-07 21:35:48 +053019#define safe_smp_processor_id() 0
Jaswinder Singh Rajputf472cdb2009-01-07 21:34:25 +053020#define stack_smp_processor_id() 0
21
Jaswinder Singh Rajput6e5385d2009-01-07 18:11:35 +053022#endif /* CONFIG_SMP */
23
travis@sgi.com30964d52008-01-30 13:33:11 +010024struct x86_cpu {
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 struct cpu cpu;
26};
Alexander van Heukelumd9874022008-02-01 17:49:43 +010027
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#ifdef CONFIG_HOTPLUG_CPU
Alexander van Heukelumd9874022008-02-01 17:49:43 +010029extern int arch_register_cpu(int num);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030extern void arch_unregister_cpu(int);
Paul Gortmaker148f9bb2013-06-18 18:23:59 -040031extern void start_cpu0(void);
Fenghua Yua71c8bc2012-11-13 11:32:51 -080032#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
33extern int _debug_hotplug_cpu(int cpu, int action);
34#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070035#endif
36
Zwane Mwaikambof3705132005-06-25 14:54:50 -070037DECLARE_PER_CPU(int, cpu_state);
Jaswinder Singh Rajput6d652ea2009-01-07 21:38:59 +053038
Borislav Petkov1c9d16e2011-02-11 18:17:54 +010039int mwait_usable(const struct cpuinfo_x86 *);
Jaswinder Singh Rajput6d652ea2009-01-07 21:38:59 +053040
H. Peter Anvin1965aae2008-10-22 22:26:29 -070041#endif /* _ASM_X86_CPU_H */