WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Changeset 7419 introduced a check for DOM0 before settin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Changeset 7419 introduced a check for DOM0 before setting a bit in the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Nov 2005 11:22:06 +0000
Delivery-date: Wed, 02 Nov 2005 11:19:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Changeset 7419 introduced a check for DOM0 before setting a bit in the, Xen patchbot -unstable <=