aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/smp.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-04-26 11:32:41 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-05-06 03:41:56 -0400
commitcc1ba8ea6dde3f049b2b365d8fdc13976aee25cb (patch)
tree89276abd9b89c39967a04ec39dcfc1ca2a924f6d /arch/powerpc/include/asm/smp.h
parente6532c63cc3dbefc79936fc9c9c68a151004fe46 (diff)
powerpc/cpumask: Dynamically allocate cpu_sibling_map and cpu_core_map cpumasks
Dynamically allocate cpu_sibling_map and cpu_core_map cpumasks. We don't need to set_cpu_online() the boot cpu in smp_prepare_boot_cpu, init/main.c does it for us. We also postpone setting of the boot cpu in cpu_sibling_map and cpu_core_map until when the memory allocator is available (smp_prepare_cpus), similar to x86. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/smp.h')
-rw-r--r--arch/powerpc/include/asm/smp.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 4d332296c40..66e237bbe15 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -68,8 +68,19 @@ static inline void set_hard_smp_processor_id(int cpu, int phys)
68} 68}
69#endif 69#endif
70 70
71DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 71DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map);
72DECLARE_PER_CPU(cpumask_t, cpu_core_map); 72DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
73
74static inline struct cpumask *cpu_sibling_mask(int cpu)
75{
76 return per_cpu(cpu_sibling_map, cpu);
77}
78
79static inline struct cpumask *cpu_core_mask(int cpu)
80{
81 return per_cpu(cpu_core_map, cpu);
82}
83
73extern int cpu_to_core_id(int cpu); 84extern int cpu_to_core_id(int cpu);
74 85
75/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. 86/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
@@ -93,7 +104,6 @@ void smp_init_pSeries(void);
93void smp_init_cell(void); 104void smp_init_cell(void);
94void smp_init_celleb(void); 105void smp_init_celleb(void);
95void smp_setup_cpu_maps(void); 106void smp_setup_cpu_maps(void);
96void smp_setup_cpu_sibling_map(void);
97 107
98extern int __cpu_disable(void); 108extern int __cpu_disable(void);
99extern void __cpu_die(unsigned int cpu); 109extern void __cpu_die(unsigned int cpu);