cpu hotplug: tasklet and timer initialisation is high priority.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 18 May 2010 12:41:55 +0000 (13:41 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 18 May 2010 12:41:55 +0000 (13:41 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/common/tasklet.c
xen/common/timer.c

index 2e23232c41ca3f52ffa3f9a5a99ddeedad923f0a..3dff65074e2fa67ab08282a6c3406fa568d66f8d 100644 (file)
@@ -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)
index 0759df818fa174c07e70a9af76ae617332e468ab..57d488ce9aef25176b32fd0d98cfcd603ef079cd 100644 (file)
@@ -521,18 +521,29 @@ static int cpu_callback(
     struct notifier_block *nfb, unsigned long action, void *hcpu)
 {
     unsigned int cpu = (unsigned long)hcpu;
+    struct timers *ts = &per_cpu(timers, cpu);
 
-    if ( action == CPU_UP_PREPARE )
+    switch ( action )
     {
-        spin_lock_init(&per_cpu(timers, cpu).lock);
-        per_cpu(timers, cpu).heap = &dummy_heap;
+    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)