x86-64: Move cpu number from PDA to per-cpu and consolidate with 32-bit.
tj: moved cpu_number definition out of CONFIG_HAVE_SETUP_PER_CPU_AREA for voyager. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@ -25,9 +25,7 @@ extern unsigned int num_processors;
|
||||
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
|
||||
DECLARE_PER_CPU(cpumask_t, cpu_core_map);
|
||||
DECLARE_PER_CPU(u16, cpu_llc_id);
|
||||
#ifdef CONFIG_X86_32
|
||||
DECLARE_PER_CPU(int, cpu_number);
|
||||
#endif
|
||||
|
||||
static inline struct cpumask *cpu_sibling_mask(int cpu)
|
||||
{
|
||||
@ -164,7 +162,7 @@ extern unsigned disabled_cpus __cpuinitdata;
|
||||
extern int safe_smp_processor_id(void);
|
||||
|
||||
#elif defined(CONFIG_X86_64_SMP)
|
||||
#define raw_smp_processor_id() read_pda(cpunumber)
|
||||
#define raw_smp_processor_id() (percpu_read(cpu_number))
|
||||
|
||||
#define stack_smp_processor_id() \
|
||||
({ \
|
||||
|
Reference in New Issue
Block a user