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

[Xen-changelog] [xen-unstable] cpu hotplug: tasklet and timer initialisation is high priority.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274186515 -3600
# Node ID 9d5afef2421c84137959093bc25c1421c0e5c4ee
# Parent  4244ccdb690ee7c5662b7eceef43ae4a2ceb0d84
cpu hotplug: tasklet and timer initialisation is high priority.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/tasklet.c |    3 ++-
 xen/common/timer.c   |   23 +++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff -r 4244ccdb690e -r 9d5afef2421c xen/common/tasklet.c
--- a/xen/common/tasklet.c      Tue May 18 13:31:24 2010 +0100
+++ b/xen/common/tasklet.c      Tue May 18 13:41:55 2010 +0100
@@ -188,7 +188,8 @@ static int cpu_callback(
 }
 
 static struct notifier_block cpu_nfb = {
-    .notifier_call = cpu_callback
+    .notifier_call = cpu_callback,
+    .priority = 99
 };
 
 void __init tasklet_subsys_init(void)
diff -r 4244ccdb690e -r 9d5afef2421c xen/common/timer.c
--- a/xen/common/timer.c        Tue May 18 13:31:24 2010 +0100
+++ b/xen/common/timer.c        Tue May 18 13:41:55 2010 +0100
@@ -521,18 +521,29 @@ static int cpu_callback(
     struct notifier_block *nfb, unsigned long action, void *hcpu)
 {
     unsigned int cpu = (unsigned long)hcpu;
-
-    if ( action == CPU_UP_PREPARE )
-    {
-        spin_lock_init(&per_cpu(timers, cpu).lock);
-        per_cpu(timers, cpu).heap = &dummy_heap;
+    struct timers *ts = &per_cpu(timers, cpu);
+
+    switch ( action )
+    {
+    case CPU_UP_PREPARE:
+        spin_lock_init(&ts->lock);
+        ts->heap = &dummy_heap;
+        break;
+    case CPU_UP_CANCELED:
+    case CPU_DEAD:
+        /* Enable this later. */
+        /*WARN_ON(GET_HEAP_SIZE(ts->heap) || ts->list);*/
+        break;
+    default:
+        break;
     }
 
     return NOTIFY_DONE;
 }
 
 static struct notifier_block cpu_nfb = {
-    .notifier_call = cpu_callback
+    .notifier_call = cpu_callback,
+    .priority = 99
 };
 
 void __init timer_init(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®.