cpu.h 907 字节
Newer Older
H
H. Peter Anvin 已提交
1 2
#ifndef _ASM_X86_CPU_H
#define _ASM_X86_CPU_H
L
Linus Torvalds 已提交
3 4 5 6 7

#include <linux/device.h>
#include <linux/cpu.h>
#include <linux/topology.h>
#include <linux/nodemask.h>
Z
Zwane Mwaikambo 已提交
8
#include <linux/percpu.h>
L
Linus Torvalds 已提交
9

10 11 12 13 14 15 16 17
#ifdef CONFIG_SMP

extern void prefill_possible_map(void);

#else /* CONFIG_SMP */

static inline void prefill_possible_map(void) {}

18
#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
19
#define safe_smp_processor_id()			0
20

21 22
#endif /* CONFIG_SMP */

23
struct x86_cpu {
L
Linus Torvalds 已提交
24 25
	struct cpu cpu;
};
26

L
Linus Torvalds 已提交
27
#ifdef CONFIG_HOTPLUG_CPU
28
extern int arch_register_cpu(int num);
L
Linus Torvalds 已提交
29
extern void arch_unregister_cpu(int);
30
extern void start_cpu0(void);
F
Fenghua Yu 已提交
31 32 33
#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
extern int _debug_hotplug_cpu(int cpu, int action);
#endif
L
Linus Torvalds 已提交
34 35
#endif

36
int mwait_usable(const struct cpuinfo_x86 *);
37

38 39 40
unsigned int x86_family(unsigned int sig);
unsigned int x86_model(unsigned int sig);
unsigned int x86_stepping(unsigned int sig);
H
H. Peter Anvin 已提交
41
#endif /* _ASM_X86_CPU_H */