aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/ipi.h2
-rw-r--r--include/asm-x86/smp_32.h6
-rw-r--r--include/asm-x86/smp_64.h6
3 files changed, 9 insertions, 5 deletions
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h
index a7c75ea408a8..6d011bd6067d 100644
--- a/include/asm-x86/ipi.h
+++ b/include/asm-x86/ipi.h
@@ -119,7 +119,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
119 */ 119 */
120 local_irq_save(flags); 120 local_irq_save(flags);
121 for_each_cpu_mask(query_cpu, mask) { 121 for_each_cpu_mask(query_cpu, mask) {
122 __send_IPI_dest_field(x86_cpu_to_apicid[query_cpu], 122 __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu),
123 vector, APIC_DEST_PHYSICAL); 123 vector, APIC_DEST_PHYSICAL);
124 } 124 }
125 local_irq_restore(flags); 125 local_irq_restore(flags);
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h
index ee46038d126c..9006f6041bf8 100644
--- a/include/asm-x86/smp_32.h
+++ b/include/asm-x86/smp_32.h
@@ -39,9 +39,11 @@ extern void lock_ipi_call_lock(void);
39extern void unlock_ipi_call_lock(void); 39extern void unlock_ipi_call_lock(void);
40 40
41#define MAX_APICID 256 41#define MAX_APICID 256
42extern u8 x86_cpu_to_apicid[]; 42extern u8 __initdata x86_cpu_to_apicid_init[];
43extern void *x86_cpu_to_apicid_ptr;
44DECLARE_PER_CPU(u8, x86_cpu_to_apicid);
43 45
44#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] 46#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
45 47
46extern void set_cpu_sibling_map(int cpu); 48extern void set_cpu_sibling_map(int cpu);
47 49
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index 9d35018e54fe..f1545704e24e 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -86,7 +86,9 @@ static inline int hard_smp_processor_id(void)
86 * Some lowlevel functions might want to know about 86 * Some lowlevel functions might want to know about
87 * the real APIC ID <-> CPU # mapping. 87 * the real APIC ID <-> CPU # mapping.
88 */ 88 */
89extern u8 x86_cpu_to_apicid[NR_CPUS]; /* physical ID */ 89extern u8 __initdata x86_cpu_to_apicid_init[];
90extern void *x86_cpu_to_apicid_ptr;
91DECLARE_PER_CPU(u8, x86_cpu_to_apicid); /* physical ID */
90extern u8 bios_cpu_apicid[]; 92extern u8 bios_cpu_apicid[];
91 93
92static inline int cpu_present_to_apicid(int mps_cpu) 94static inline int cpu_present_to_apicid(int mps_cpu)
@@ -117,7 +119,7 @@ static __inline int logical_smp_processor_id(void)
117} 119}
118 120
119#ifdef CONFIG_SMP 121#ifdef CONFIG_SMP
120#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] 122#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
121#else 123#else
122#define cpu_physical_id(cpu) boot_cpu_id 124#define cpu_physical_id(cpu) boot_cpu_id
123#endif /* !CONFIG_SMP */ 125#endif /* !CONFIG_SMP */