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

[Xen-changelog] Changeset 7419 introduced a check for DOM0 before setting a bit in the



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5ed53e973b833850eb2fcba16a361988ea133661
# Parent  ae2e13795c639a450ba2133ed7759da9bdffb170
Changeset 7419 introduced a check for DOM0 before setting a bit in the
cpu_present map.  This prevents domU SMP kernels without HOTPLUG_CPU
support from booting.  Secondary cpus need to be present and online
before init/main.c:do_basic_setup() calls init_workqueues() (which
initializes per-cpu workqueues).

Without this patch, non HOTPLUG_CPU enabled kernels hang when flushing
cpu workqueues as the spinlock in the structure is never initialized (it
has a default value of zero which means the lock has been acquired on 
x86).

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r ae2e13795c63 -r 5ed53e973b83 
linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Tue Nov  1 18:13:06 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Tue Nov  1 23:08:01 2005
@@ -236,8 +236,12 @@
                make_page_readonly((void *)cpu_gdt_descr[cpu].address);
 
                cpu_set(cpu, cpu_possible_map);
+#ifdef CONFIG_HOTPLUG_CPU
                if (xen_start_info->flags & SIF_INITDOMAIN)
                        cpu_set(cpu, cpu_present_map);
+#else
+               cpu_set(cpu, cpu_present_map);
+#endif
 
                vcpu_prepare(cpu);
        }
@@ -265,6 +269,8 @@
        cpu_online_map   = cpumask_of_cpu(0);
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+
 static void vcpu_hotplug(unsigned int cpu)
 {
        int err;
@@ -284,11 +290,7 @@
                cpu_set(cpu, cpu_present_map);
                (void)cpu_up(cpu);
        } else if (strcmp(state, "offline") == 0) {
-#ifdef CONFIG_HOTPLUG_CPU
                (void)cpu_down(cpu);
-#else
-               printk(KERN_INFO "Ignoring CPU%d hotplug request\n", cpu);
-#endif
        } else {
                printk(KERN_ERR "XENBUS: unknown state(%s) on CPU%d\n",
                       state, cpu);
@@ -337,8 +339,6 @@
 }
 
 subsys_initcall(setup_vcpu_hotplug_event);
-
-#ifdef CONFIG_HOTPLUG_CPU
 
 int __cpu_disable(void)
 {

_______________________________________________
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®.