aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/smp.h')
-rw-r--r--include/asm-x86/smp.h48
1 files changed, 23 insertions, 25 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 1ebaa5cd3112..c2784b3e0b77 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -29,21 +29,12 @@ extern int smp_num_siblings;
29extern unsigned int num_processors; 29extern unsigned int num_processors;
30extern cpumask_t cpu_initialized; 30extern cpumask_t cpu_initialized;
31 31
32#ifdef CONFIG_SMP
33extern u16 x86_cpu_to_apicid_init[];
34extern u16 x86_bios_cpu_apicid_init[];
35extern void *x86_cpu_to_apicid_early_ptr;
36extern void *x86_bios_cpu_apicid_early_ptr;
37#else
38#define x86_cpu_to_apicid_early_ptr NULL
39#define x86_bios_cpu_apicid_early_ptr NULL
40#endif
41
42DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 32DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
43DECLARE_PER_CPU(cpumask_t, cpu_core_map); 33DECLARE_PER_CPU(cpumask_t, cpu_core_map);
44DECLARE_PER_CPU(u16, cpu_llc_id); 34DECLARE_PER_CPU(u16, cpu_llc_id);
45DECLARE_PER_CPU(u16, x86_cpu_to_apicid); 35
46DECLARE_PER_CPU(u16, x86_bios_cpu_apicid); 36DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
37DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
47 38
48/* Static state in head.S used to set up a CPU */ 39/* Static state in head.S used to set up a CPU */
49extern struct { 40extern struct {
@@ -59,9 +50,9 @@ struct smp_ops {
59 50
60 void (*smp_send_stop)(void); 51 void (*smp_send_stop)(void);
61 void (*smp_send_reschedule)(int cpu); 52 void (*smp_send_reschedule)(int cpu);
62 int (*smp_call_function_mask)(cpumask_t mask, 53
63 void (*func)(void *info), void *info, 54 void (*send_call_func_ipi)(cpumask_t mask);
64 int wait); 55 void (*send_call_func_single_ipi)(int cpu);
65}; 56};
66 57
67/* Globals due to paravirt */ 58/* Globals due to paravirt */
@@ -103,23 +94,26 @@ static inline void smp_send_reschedule(int cpu)
103 smp_ops.smp_send_reschedule(cpu); 94 smp_ops.smp_send_reschedule(cpu);
104} 95}
105 96
106static inline int smp_call_function_mask(cpumask_t mask, 97static inline void arch_send_call_function_single_ipi(int cpu)
107 void (*func) (void *info), void *info, 98{
108 int wait) 99 smp_ops.send_call_func_single_ipi(cpu);
100}
101
102static inline void arch_send_call_function_ipi(cpumask_t mask)
109{ 103{
110 return smp_ops.smp_call_function_mask(mask, func, info, wait); 104 smp_ops.send_call_func_ipi(mask);
111} 105}
112 106
113void native_smp_prepare_boot_cpu(void); 107void native_smp_prepare_boot_cpu(void);
114void native_smp_prepare_cpus(unsigned int max_cpus); 108void native_smp_prepare_cpus(unsigned int max_cpus);
115void native_smp_cpus_done(unsigned int max_cpus); 109void native_smp_cpus_done(unsigned int max_cpus);
116int native_cpu_up(unsigned int cpunum); 110int native_cpu_up(unsigned int cpunum);
111void native_send_call_func_ipi(cpumask_t mask);
112void native_send_call_func_single_ipi(int cpu);
117 113
118extern int __cpu_disable(void); 114extern int __cpu_disable(void);
119extern void __cpu_die(unsigned int cpu); 115extern void __cpu_die(unsigned int cpu);
120 116
121extern void prefill_possible_map(void);
122
123void smp_store_cpu_info(int id); 117void smp_store_cpu_info(int id);
124#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) 118#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
125 119
@@ -130,6 +124,14 @@ static inline int num_booting_cpus(void)
130} 124}
131#endif /* CONFIG_SMP */ 125#endif /* CONFIG_SMP */
132 126
127#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_CPU)
128extern void prefill_possible_map(void);
129#else
130static inline void prefill_possible_map(void)
131{
132}
133#endif
134
133extern unsigned disabled_cpus __cpuinitdata; 135extern unsigned disabled_cpus __cpuinitdata;
134 136
135#ifdef CONFIG_X86_32_SMP 137#ifdef CONFIG_X86_32_SMP
@@ -197,12 +199,8 @@ static inline int hard_smp_processor_id(void)
197#endif /* CONFIG_X86_LOCAL_APIC */ 199#endif /* CONFIG_X86_LOCAL_APIC */
198 200
199#ifdef CONFIG_HOTPLUG_CPU 201#ifdef CONFIG_HOTPLUG_CPU
200extern void cpu_exit_clear(void);
201extern void cpu_uninit(void); 202extern void cpu_uninit(void);
202#endif 203#endif
203 204
204extern void smp_alloc_memory(void);
205extern void lock_ipi_call_lock(void);
206extern void unlock_ipi_call_lock(void);
207#endif /* __ASSEMBLY__ */ 205#endif /* __ASSEMBLY__ */
208#endif 206#endif