diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 17:56:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 17:56:42 -0500 |
commit | 1de8cd3cb9f61e854e743c7210df43db517d4832 (patch) | |
tree | 2b69c5ba5e4094037fa04d0fcb6c4537c222cde8 /arch/x86/include/asm/smp.h | |
parent | 1eb1b3b65dc3e3ffcc6a60e115c085c0c11c1077 (diff) | |
parent | 3d14bdad40315b54470cb7812293d14c8af2bf7d (diff) |
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'arch/x86/include/asm/smp.h')
-rw-r--r-- | arch/x86/include/asm/smp.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 74ad9ef6ae02..1963e27673c9 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -18,15 +18,31 @@ | |||
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 | |||
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; | ||
21 | extern cpumask_t cpu_callout_map; | 31 | extern cpumask_t cpu_callout_map; |
22 | extern cpumask_t cpu_initialized; | 32 | extern cpumask_t cpu_initialized; |
23 | extern cpumask_t cpu_callin_map; | 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 */ | ||
24 | 41 | ||
25 | extern int __cpuinit get_local_pda(int cpu); | 42 | extern int __cpuinit get_local_pda(int cpu); |
26 | 43 | ||
27 | extern int smp_num_siblings; | 44 | extern int smp_num_siblings; |
28 | extern unsigned int num_processors; | 45 | extern unsigned int num_processors; |
29 | extern cpumask_t cpu_initialized; | ||
30 | 46 | ||
31 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 47 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
32 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 48 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
@@ -35,6 +51,16 @@ DECLARE_PER_CPU(u16, cpu_llc_id); | |||
35 | DECLARE_PER_CPU(int, cpu_number); | 51 | DECLARE_PER_CPU(int, cpu_number); |
36 | #endif | 52 | #endif |
37 | 53 | ||
54 | static inline struct cpumask *cpu_sibling_mask(int cpu) | ||
55 | { | ||
56 | return &per_cpu(cpu_sibling_map, cpu); | ||
57 | } | ||
58 | |||
59 | static inline struct cpumask *cpu_core_mask(int cpu) | ||
60 | { | ||
61 | return &per_cpu(cpu_core_map, cpu); | ||
62 | } | ||
63 | |||
38 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); | 64 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); |
39 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); | 65 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); |
40 | 66 | ||
@@ -144,7 +170,7 @@ void smp_store_cpu_info(int id); | |||
144 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | 170 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ |
145 | static inline int num_booting_cpus(void) | 171 | static inline int num_booting_cpus(void) |
146 | { | 172 | { |
147 | return cpus_weight(cpu_callout_map); | 173 | return cpumask_weight(cpu_callout_mask); |
148 | } | 174 | } |
149 | #endif /* CONFIG_SMP */ | 175 | #endif /* CONFIG_SMP */ |
150 | 176 | ||