diff options
Diffstat (limited to 'include/asm-x86/smp.h')
-rw-r--r-- | include/asm-x86/smp.h | 48 |
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; | |||
29 | extern unsigned int num_processors; | 29 | extern unsigned int num_processors; |
30 | extern cpumask_t cpu_initialized; | 30 | extern cpumask_t cpu_initialized; |
31 | 31 | ||
32 | #ifdef CONFIG_SMP | ||
33 | extern u16 x86_cpu_to_apicid_init[]; | ||
34 | extern u16 x86_bios_cpu_apicid_init[]; | ||
35 | extern void *x86_cpu_to_apicid_early_ptr; | ||
36 | extern 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 | |||
42 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 32 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
43 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 33 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
44 | DECLARE_PER_CPU(u16, cpu_llc_id); | 34 | DECLARE_PER_CPU(u16, cpu_llc_id); |
45 | DECLARE_PER_CPU(u16, x86_cpu_to_apicid); | 35 | |
46 | DECLARE_PER_CPU(u16, x86_bios_cpu_apicid); | 36 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); |
37 | DECLARE_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 */ |
49 | extern struct { | 40 | extern 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 | ||
106 | static inline int smp_call_function_mask(cpumask_t mask, | 97 | static 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 | |||
102 | static 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 | ||
113 | void native_smp_prepare_boot_cpu(void); | 107 | void native_smp_prepare_boot_cpu(void); |
114 | void native_smp_prepare_cpus(unsigned int max_cpus); | 108 | void native_smp_prepare_cpus(unsigned int max_cpus); |
115 | void native_smp_cpus_done(unsigned int max_cpus); | 109 | void native_smp_cpus_done(unsigned int max_cpus); |
116 | int native_cpu_up(unsigned int cpunum); | 110 | int native_cpu_up(unsigned int cpunum); |
111 | void native_send_call_func_ipi(cpumask_t mask); | ||
112 | void native_send_call_func_single_ipi(int cpu); | ||
117 | 113 | ||
118 | extern int __cpu_disable(void); | 114 | extern int __cpu_disable(void); |
119 | extern void __cpu_die(unsigned int cpu); | 115 | extern void __cpu_die(unsigned int cpu); |
120 | 116 | ||
121 | extern void prefill_possible_map(void); | ||
122 | |||
123 | void smp_store_cpu_info(int id); | 117 | void 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) | ||
128 | extern void prefill_possible_map(void); | ||
129 | #else | ||
130 | static inline void prefill_possible_map(void) | ||
131 | { | ||
132 | } | ||
133 | #endif | ||
134 | |||
133 | extern unsigned disabled_cpus __cpuinitdata; | 135 | extern 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 |
200 | extern void cpu_exit_clear(void); | ||
201 | extern void cpu_uninit(void); | 202 | extern void cpu_uninit(void); |
202 | #endif | 203 | #endif |
203 | 204 | ||
204 | extern void smp_alloc_memory(void); | ||
205 | extern void lock_ipi_call_lock(void); | ||
206 | extern void unlock_ipi_call_lock(void); | ||
207 | #endif /* __ASSEMBLY__ */ | 205 | #endif /* __ASSEMBLY__ */ |
208 | #endif | 206 | #endif |