cpu.h 621 字节
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 safe_smp_processor_id()			0
19 20
#define stack_smp_processor_id()		0

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 30 31
extern void arch_unregister_cpu(int);
#endif

Z
Zwane Mwaikambo 已提交
32
DECLARE_PER_CPU(int, cpu_state);
H
H. Peter Anvin 已提交
33
#endif /* _ASM_X86_CPU_H */