diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-18 12:15:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-18 12:15:49 -0500 |
commit | af37501c792107c2bde1524bdae38d9a247b841a (patch) | |
tree | b50ee90d29e72956b8b7d8d19677fe5996755d49 /arch/x86/include/asm/smp.h | |
parent | d859e29fe34cb833071b20aef860ee94fbad9bb2 (diff) | |
parent | 99937d6455cea95405ac681c86a857d0fcd530bd (diff) |
Merge branch 'core/percpu' into perfcounters/core
Conflicts:
arch/x86/include/asm/pda.h
We merge tip/core/percpu into tip/perfcounters/core because of a
semantic and contextual conflict: the former eliminates the PDA,
while the latter extends it with apic_perf_irqs field.
Resolve the conflict by moving the new field to the irq_cpustat
structure on 64-bit too.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/smp.h')
-rw-r--r-- | arch/x86/include/asm/smp.h | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 19953df61c52..68636e767a91 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -17,32 +17,7 @@ | |||
17 | #endif | 17 | #endif |
18 | #include <asm/pda.h> | 18 | #include <asm/pda.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | 20 | #include <asm/cpumask.h> | |
21 | #ifdef CONFIG_X86_64 | ||
22 | |||
23 | extern cpumask_var_t cpu_callin_mask; | ||
24 | extern cpumask_var_t cpu_callout_mask; | ||
25 | extern cpumask_var_t cpu_initialized_mask; | ||
26 | extern cpumask_var_t cpu_sibling_setup_mask; | ||
27 | |||
28 | #else /* CONFIG_X86_32 */ | ||
29 | |||
30 | extern cpumask_t cpu_callin_map; | ||
31 | extern cpumask_t cpu_callout_map; | ||
32 | extern cpumask_t cpu_initialized; | ||
33 | extern cpumask_t cpu_sibling_setup_map; | ||
34 | |||
35 | #define cpu_callin_mask ((struct cpumask *)&cpu_callin_map) | ||
36 | #define cpu_callout_mask ((struct cpumask *)&cpu_callout_map) | ||
37 | #define cpu_initialized_mask ((struct cpumask *)&cpu_initialized) | ||
38 | #define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map) | ||
39 | |||
40 | #endif /* CONFIG_X86_32 */ | ||
41 | |||
42 | extern void (*mtrr_hook)(void); | ||
43 | extern void zap_low_mappings(void); | ||
44 | |||
45 | extern int __cpuinit get_local_pda(int cpu); | ||
46 | 21 | ||
47 | extern int smp_num_siblings; | 22 | extern int smp_num_siblings; |
48 | extern unsigned int num_processors; | 23 | extern unsigned int num_processors; |
@@ -50,9 +25,7 @@ extern unsigned int num_processors; | |||
50 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 25 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
51 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 26 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
52 | DECLARE_PER_CPU(u16, cpu_llc_id); | 27 | DECLARE_PER_CPU(u16, cpu_llc_id); |
53 | #ifdef CONFIG_X86_32 | ||
54 | DECLARE_PER_CPU(int, cpu_number); | 28 | DECLARE_PER_CPU(int, cpu_number); |
55 | #endif | ||
56 | 29 | ||
57 | static inline struct cpumask *cpu_sibling_mask(int cpu) | 30 | static inline struct cpumask *cpu_sibling_mask(int cpu) |
58 | { | 31 | { |
@@ -167,8 +140,6 @@ void play_dead_common(void); | |||
167 | void native_send_call_func_ipi(const struct cpumask *mask); | 140 | void native_send_call_func_ipi(const struct cpumask *mask); |
168 | void native_send_call_func_single_ipi(int cpu); | 141 | void native_send_call_func_single_ipi(int cpu); |
169 | 142 | ||
170 | extern void prefill_possible_map(void); | ||
171 | |||
172 | void smp_store_cpu_info(int id); | 143 | void smp_store_cpu_info(int id); |
173 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) | 144 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
174 | 145 | ||
@@ -177,10 +148,6 @@ static inline int num_booting_cpus(void) | |||
177 | { | 148 | { |
178 | return cpumask_weight(cpu_callout_mask); | 149 | return cpumask_weight(cpu_callout_mask); |
179 | } | 150 | } |
180 | #else | ||
181 | static inline void prefill_possible_map(void) | ||
182 | { | ||
183 | } | ||
184 | #endif /* CONFIG_SMP */ | 151 | #endif /* CONFIG_SMP */ |
185 | 152 | ||
186 | extern unsigned disabled_cpus __cpuinitdata; | 153 | extern unsigned disabled_cpus __cpuinitdata; |
@@ -191,11 +158,11 @@ extern unsigned disabled_cpus __cpuinitdata; | |||
191 | * from the initial startup. We map APIC_BASE very early in page_setup(), | 158 | * from the initial startup. We map APIC_BASE very early in page_setup(), |
192 | * so this is correct in the x86 case. | 159 | * so this is correct in the x86 case. |
193 | */ | 160 | */ |
194 | #define raw_smp_processor_id() (x86_read_percpu(cpu_number)) | 161 | #define raw_smp_processor_id() (percpu_read(cpu_number)) |
195 | extern int safe_smp_processor_id(void); | 162 | extern int safe_smp_processor_id(void); |
196 | 163 | ||
197 | #elif defined(CONFIG_X86_64_SMP) | 164 | #elif defined(CONFIG_X86_64_SMP) |
198 | #define raw_smp_processor_id() read_pda(cpunumber) | 165 | #define raw_smp_processor_id() (percpu_read(cpu_number)) |
199 | 166 | ||
200 | #define stack_smp_processor_id() \ | 167 | #define stack_smp_processor_id() \ |
201 | ({ \ | 168 | ({ \ |
@@ -205,10 +172,6 @@ extern int safe_smp_processor_id(void); | |||
205 | }) | 172 | }) |
206 | #define safe_smp_processor_id() smp_processor_id() | 173 | #define safe_smp_processor_id() smp_processor_id() |
207 | 174 | ||
208 | #else /* !CONFIG_X86_32_SMP && !CONFIG_X86_64_SMP */ | ||
209 | #define cpu_physical_id(cpu) boot_cpu_physical_apicid | ||
210 | #define safe_smp_processor_id() 0 | ||
211 | #define stack_smp_processor_id() 0 | ||
212 | #endif | 175 | #endif |
213 | 176 | ||
214 | #ifdef CONFIG_X86_LOCAL_APIC | 177 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -251,11 +214,5 @@ static inline int hard_smp_processor_id(void) | |||
251 | 214 | ||
252 | #endif /* CONFIG_X86_LOCAL_APIC */ | 215 | #endif /* CONFIG_X86_LOCAL_APIC */ |
253 | 216 | ||
254 | #ifdef CONFIG_X86_HAS_BOOT_CPU_ID | ||
255 | extern unsigned char boot_cpu_id; | ||
256 | #else | ||
257 | #define boot_cpu_id 0 | ||
258 | #endif | ||
259 | |||
260 | #endif /* __ASSEMBLY__ */ | 217 | #endif /* __ASSEMBLY__ */ |
261 | #endif /* _ASM_X86_SMP_H */ | 218 | #endif /* _ASM_X86_SMP_H */ |