[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [linux] Delay making the VCPUOP_initialise calls until the cpu is brought up



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1170110631 0
# Node ID 5e3b47bcc311e7698959f1fa79c4654190593499
# Parent  effa38a30a5c8a53c1568157ce6f664d127b773e
[linux] Delay making the VCPUOP_initialise calls until the cpu is brought up
the first time.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/smpboot.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r effa38a30a5c -r 5e3b47bcc311 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Mon Jan 29 21:16:02 
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Mon Jan 29 22:43:51 
2007 +0000
@@ -48,6 +48,7 @@ EXPORT_SYMBOL(cpu_online_map);
 EXPORT_SYMBOL(cpu_online_map);
 cpumask_t cpu_possible_map;
 EXPORT_SYMBOL(cpu_possible_map);
+static cpumask_t cpu_initialized_map;
 
 struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
 EXPORT_SYMBOL(cpu_data);
@@ -277,6 +278,8 @@ void __init smp_prepare_cpus(unsigned in
 
        if (xen_smp_intr_init(0))
                BUG();
+
+       cpu_initialized_map = cpumask_of_cpu(0);
 
        /* Restrict the possible_map according to max_cpus. */
        while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
@@ -330,8 +333,6 @@ void __init smp_prepare_cpus(unsigned in
 #else
                cpu_set(cpu, cpu_present_map);
 #endif
-
-               cpu_initialize_context(cpu);
        }
 
        init_xenbus_allowed_cpumask();
@@ -418,6 +419,11 @@ int __devinit __cpu_up(unsigned int cpu)
        if (rc)
                return rc;
 
+       if (!cpu_isset(cpu, cpu_initialized_map)) {
+               cpu_set(cpu, cpu_initialized_map);
+               cpu_initialize_context(cpu);
+       }
+
        if (num_online_cpus() == 1)
                alternatives_smp_switch(1);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.