aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-09-23 07:06:25 -0400
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-10-22 16:25:45 -0400
commit801fd14a725ef7757d33f07b83415cdd2165e50a (patch)
treed1a35fc8d417673089e45e572d1dd8ce3306a369 /arch/x86/xen
parent98511f3532eb7fce274f37d94f29790922799e15 (diff)
xen: use vcpu_ops to setup cpu masks
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/smp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 25f232b18a82..138676781dd4 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -156,11 +156,16 @@ static void __init xen_fill_possible_map(void)
156{ 156{
157 int i, rc; 157 int i, rc;
158 158
159 num_processors = 0;
160 disabled_cpus = 0;
159 for (i = 0; i < nr_cpu_ids; i++) { 161 for (i = 0; i < nr_cpu_ids; i++) {
160 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); 162 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
161 if (rc >= 0) { 163 if (rc >= 0) {
162 num_processors++; 164 num_processors++;
163 set_cpu_possible(i, true); 165 set_cpu_possible(i, true);
166 } else {
167 set_cpu_possible(i, false);
168 set_cpu_present(i, false);
164 } 169 }
165 } 170 }
166} 171}
@@ -190,6 +195,8 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
190 if (xen_smp_intr_init(0)) 195 if (xen_smp_intr_init(0))
191 BUG(); 196 BUG();
192 197
198 xen_fill_possible_map();
199
193 if (!alloc_cpumask_var(&xen_cpu_initialized_map, GFP_KERNEL)) 200 if (!alloc_cpumask_var(&xen_cpu_initialized_map, GFP_KERNEL))
194 panic("could not allocate xen_cpu_initialized_map\n"); 201 panic("could not allocate xen_cpu_initialized_map\n");
195 202
@@ -480,6 +487,5 @@ static const struct smp_ops xen_smp_ops __initdata = {
480void __init xen_smp_init(void) 487void __init xen_smp_init(void)
481{ 488{
482 smp_ops = xen_smp_ops; 489 smp_ops = xen_smp_ops;
483 xen_fill_possible_map();
484 xen_init_spinlocks(); 490 xen_init_spinlocks();
485} 491}