2008-10-23 07:26:29 +02:00
|
|
|
#ifndef _ASM_X86_CPU_H
|
|
|
|
#define _ASM_X86_CPU_H
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/cpu.h>
|
|
|
|
#include <linux/topology.h>
|
|
|
|
#include <linux/nodemask.h>
|
2005-06-25 23:54:50 +02:00
|
|
|
#include <linux/percpu.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2009-01-07 13:41:35 +01:00
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
|
|
|
|
extern void prefill_possible_map(void);
|
|
|
|
|
|
|
|
#else /* CONFIG_SMP */
|
|
|
|
|
|
|
|
static inline void prefill_possible_map(void) {}
|
|
|
|
|
2009-01-07 17:07:33 +01:00
|
|
|
#define cpu_physical_id(cpu) boot_cpu_physical_apicid
|
2009-01-07 17:05:48 +01:00
|
|
|
#define safe_smp_processor_id() 0
|
2009-01-07 17:04:25 +01:00
|
|
|
#define stack_smp_processor_id() 0
|
|
|
|
|
2009-01-07 13:41:35 +01:00
|
|
|
#endif /* CONFIG_SMP */
|
|
|
|
|
2008-01-30 13:33:11 +01:00
|
|
|
struct x86_cpu {
|
2005-04-17 00:20:36 +02:00
|
|
|
struct cpu cpu;
|
|
|
|
};
|
2008-02-01 17:49:43 +01:00
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
2008-02-01 17:49:43 +01:00
|
|
|
extern int arch_register_cpu(int num);
|
2005-04-17 00:20:36 +02:00
|
|
|
extern void arch_unregister_cpu(int);
|
2012-11-14 13:36:53 +01:00
|
|
|
extern void __cpuinit start_cpu0(void);
|
2012-11-13 20:32:51 +01:00
|
|
|
#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
|
|
|
|
extern int _debug_hotplug_cpu(int cpu, int action);
|
|
|
|
#endif
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif
|
|
|
|
|
2005-06-25 23:54:50 +02:00
|
|
|
DECLARE_PER_CPU(int, cpu_state);
|
2009-01-07 17:08:59 +01:00
|
|
|
|
2011-02-11 18:17:54 +01:00
|
|
|
int mwait_usable(const struct cpuinfo_x86 *);
|
2009-01-07 17:08:59 +01:00
|
|
|
|
2008-10-23 07:26:29 +02:00
|
|
|
#endif /* _ASM_X86_CPU_H */
|