aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/timer.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-18 13:41:55 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-18 13:41:55 +0100
commit852ed0aaf07ad074ac111b1a432de5b816aad7fd (patch)
tree7292062b1738fb4bf3b95a7becd1a9b5a4f27c4a /xen/common/timer.c
parentc968906953332256adcdfa0bc8035713ca05e0d0 (diff)
downloadxen-852ed0aaf07ad074ac111b1a432de5b816aad7fd.tar.gz
xen-852ed0aaf07ad074ac111b1a432de5b816aad7fd.tar.bz2
xen-852ed0aaf07ad074ac111b1a432de5b816aad7fd.zip
cpu hotplug: tasklet and timer initialisation is high priority.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/timer.c')
-rw-r--r--xen/common/timer.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/xen/common/timer.c b/xen/common/timer.c
index 0759df818f..57d488ce9a 100644
--- a/xen/common/timer.c
+++ b/xen/common/timer.c
@@ -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)