blob: b185091bf19ce39f67a325ecd6aafb7c13f8cd23 [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 Rajput96b89dc62009-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);
31#endif
32
Zwane Mwaikambof3705132005-06-25 14:54:50 -070033DECLARE_PER_CPU(int, cpu_state);
Jaswinder Singh Rajput6d652ea2009-01-07 21:38:59 +053034
Ingo Molnarc0b58422009-01-27 17:13:05 +010035extern unsigned int boot_cpu_id;
Jaswinder Singh Rajput6d652ea2009-01-07 21:38:59 +053036
H. Peter Anvin1965aae2008-10-22 22:26:29 -070037#endif /* _ASM_X86_CPU_H */