aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/smp.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-10 21:03:30 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-10 21:03:30 -0500
commitf45ac22ae2b8fc5b4c32d9b8d17ea419a8701d89 (patch)
tree8e05bccd7b85fc3dd2fbd33ec3286de27e152819 /arch/x86/include/asm/smp.h
parent79f3b3cb7a2586b319a43a7f29924c6c555e4357 (diff)
parentc59765042f53a79a7a65585042ff463b69cb248c (diff)
Merge commit 'v2.6.29-rc1' into x86/urgent
Diffstat (limited to 'arch/x86/include/asm/smp.h')
-rw-r--r--arch/x86/include/asm/smp.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 830b9fcb6427..19953df61c52 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -18,9 +18,26 @@
18#include <asm/pda.h> 18#include <asm/pda.h>
19#include <asm/thread_info.h> 19#include <asm/thread_info.h>
20 20
21#ifdef CONFIG_X86_64
22
23extern cpumask_var_t cpu_callin_mask;
24extern cpumask_var_t cpu_callout_mask;
25extern cpumask_var_t cpu_initialized_mask;
26extern cpumask_var_t cpu_sibling_setup_mask;
27
28#else /* CONFIG_X86_32 */
29
30extern cpumask_t cpu_callin_map;
21extern cpumask_t cpu_callout_map; 31extern cpumask_t cpu_callout_map;
22extern cpumask_t cpu_initialized; 32extern cpumask_t cpu_initialized;
23extern cpumask_t cpu_callin_map; 33extern 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 */
24 41
25extern void (*mtrr_hook)(void); 42extern void (*mtrr_hook)(void);
26extern void zap_low_mappings(void); 43extern void zap_low_mappings(void);
@@ -29,7 +46,6 @@ extern int __cpuinit get_local_pda(int cpu);
29 46
30extern int smp_num_siblings; 47extern int smp_num_siblings;
31extern unsigned int num_processors; 48extern unsigned int num_processors;
32extern cpumask_t cpu_initialized;
33 49
34DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 50DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
35DECLARE_PER_CPU(cpumask_t, cpu_core_map); 51DECLARE_PER_CPU(cpumask_t, cpu_core_map);
@@ -38,6 +54,16 @@ DECLARE_PER_CPU(u16, cpu_llc_id);
38DECLARE_PER_CPU(int, cpu_number); 54DECLARE_PER_CPU(int, cpu_number);
39#endif 55#endif
40 56
57static inline struct cpumask *cpu_sibling_mask(int cpu)
58{
59 return &per_cpu(cpu_sibling_map, cpu);
60}
61
62static inline struct cpumask *cpu_core_mask(int cpu)
63{
64 return &per_cpu(cpu_core_map, cpu);
65}
66
41DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); 67DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
42DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); 68DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
43 69
@@ -149,7 +175,7 @@ void smp_store_cpu_info(int id);
149/* We don't mark CPUs online until __cpu_up(), so we need another measure */ 175/* We don't mark CPUs online until __cpu_up(), so we need another measure */
150static inline int num_booting_cpus(void) 176static inline int num_booting_cpus(void)
151{ 177{
152 return cpus_weight(cpu_callout_map); 178 return cpumask_weight(cpu_callout_mask);
153} 179}
154#else 180#else
155static inline void prefill_possible_map(void) 181static inline void prefill_possible_map(void)