ia64/xen-unstable
changeset 13698:5e3b47bcc311
[linux] Delay making the VCPUOP_initialise calls until the cpu is brought up
the first time.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
the first time.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author | Christian Limpach <Christian.Limpach@xensource.com> |
---|---|
date | Mon Jan 29 22:43:51 2007 +0000 (2007-01-29) |
parents | effa38a30a5c |
children | 6e3decbd3e56 |
files | linux-2.6-xen-sparse/drivers/xen/core/smpboot.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Mon Jan 29 21:16:02 2007 +0000 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Mon Jan 29 22:43:51 2007 +0000 1.3 @@ -48,6 +48,7 @@ cpumask_t cpu_online_map; 1.4 EXPORT_SYMBOL(cpu_online_map); 1.5 cpumask_t cpu_possible_map; 1.6 EXPORT_SYMBOL(cpu_possible_map); 1.7 +static cpumask_t cpu_initialized_map; 1.8 1.9 struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; 1.10 EXPORT_SYMBOL(cpu_data); 1.11 @@ -278,6 +279,8 @@ void __init smp_prepare_cpus(unsigned in 1.12 if (xen_smp_intr_init(0)) 1.13 BUG(); 1.14 1.15 + cpu_initialized_map = cpumask_of_cpu(0); 1.16 + 1.17 /* Restrict the possible_map according to max_cpus. */ 1.18 while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) { 1.19 for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--) 1.20 @@ -330,8 +333,6 @@ void __init smp_prepare_cpus(unsigned in 1.21 #else 1.22 cpu_set(cpu, cpu_present_map); 1.23 #endif 1.24 - 1.25 - cpu_initialize_context(cpu); 1.26 } 1.27 1.28 init_xenbus_allowed_cpumask(); 1.29 @@ -418,6 +419,11 @@ int __devinit __cpu_up(unsigned int cpu) 1.30 if (rc) 1.31 return rc; 1.32 1.33 + if (!cpu_isset(cpu, cpu_initialized_map)) { 1.34 + cpu_set(cpu, cpu_initialized_map); 1.35 + cpu_initialize_context(cpu); 1.36 + } 1.37 + 1.38 if (num_online_cpus() == 1) 1.39 alternatives_smp_switch(1); 1.40