cpu.h 735 字节
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
#define stack_smp_processor_id()		0

22 23
#endif /* CONFIG_SMP */

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

L
Linus Torvalds 已提交
28
#ifdef CONFIG_HOTPLUG_CPU
29
extern int arch_register_cpu(int num);
L
Linus Torvalds 已提交
30 31 32
extern void arch_unregister_cpu(int);
#endif

Z
Zwane Mwaikambo 已提交
33
DECLARE_PER_CPU(int, cpu_state);
34

35
int __cpuinit mwait_usable(const struct cpuinfo_x86 *);
36

H
H. Peter Anvin 已提交
37
#endif /* _ASM_X86_CPU_H */