2008-10-23 13:26:29 +08:00
|
|
|
#ifndef _ASM_X86_CPU_H
|
|
|
|
#define _ASM_X86_CPU_H
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/cpu.h>
|
|
|
|
#include <linux/topology.h>
|
|
|
|
#include <linux/nodemask.h>
|
2005-06-26 05:54:50 +08:00
|
|
|
#include <linux/percpu.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2009-01-07 20:41:35 +08:00
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
|
|
|
|
extern void prefill_possible_map(void);
|
|
|
|
|
|
|
|
#else /* CONFIG_SMP */
|
|
|
|
|
|
|
|
static inline void prefill_possible_map(void) {}
|
|
|
|
|
2009-01-08 00:07:33 +08:00
|
|
|
#define cpu_physical_id(cpu) boot_cpu_physical_apicid
|
2009-01-08 00:05:48 +08:00
|
|
|
#define safe_smp_processor_id() 0
|
2009-01-08 00:04:25 +08:00
|
|
|
#define stack_smp_processor_id() 0
|
|
|
|
|
2009-01-07 20:41:35 +08:00
|
|
|
#endif /* CONFIG_SMP */
|
|
|
|
|
2008-01-30 20:33:11 +08:00
|
|
|
struct x86_cpu {
|
2005-04-17 06:20:36 +08:00
|
|
|
struct cpu cpu;
|
|
|
|
};
|
2008-02-02 00:49:43 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
2008-02-02 00:49:43 +08:00
|
|
|
extern int arch_register_cpu(int num);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern void arch_unregister_cpu(int);
|
x86: delete __cpuinit usage from all x86 files
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.
After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.
Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.
This removes all the arch/x86 uses of the __cpuinit macros from
all C files. x86 only had the one __CPUINIT used in assembly files,
and it wasn't paired off with a .previous or a __FINIT, so we can
delete it directly w/o any corresponding additional change there.
[1] https://lkml.org/lkml/2013/5/20/589
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-06-19 06:23:59 +08:00
|
|
|
extern void start_cpu0(void);
|
2012-11-14 03:32:51 +08:00
|
|
|
#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
|
|
|
|
extern int _debug_hotplug_cpu(int cpu, int action);
|
|
|
|
#endif
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|
|
|
|
|
2011-02-12 01:17:54 +08:00
|
|
|
int mwait_usable(const struct cpuinfo_x86 *);
|
2009-01-08 00:08:59 +08:00
|
|
|
|
2008-10-23 13:26:29 +08:00
|
|
|
#endif /* _ASM_X86_CPU_H */
|