From 7e2b63e6713858c13a605bae3753cbd3ba4da565 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 16 Apr 2013 15:18:00 -0400 Subject: [PATCH] --- yaml --- r: 362754 b: refs/heads/master c: 7918c92ae9638eb8a6ec18e2b4a0de84557cccc8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/xen/enlighten.c | 5 ++++- trunk/arch/x86/xen/time.c | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a6b7d4fc7992..b098c009205d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66ff0fe9e7bda8aec99985b24daad03652f7304e +refs/heads/master: 7918c92ae9638eb8a6ec18e2b4a0de84557cccc8 diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index 47d32434d0b6..ddbd54a9b845 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/arch/x86/xen/enlighten.c @@ -1641,8 +1641,11 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self, switch (action) { case CPU_UP_PREPARE: xen_vcpu_setup(cpu); - if (xen_have_vector_callback) + if (xen_have_vector_callback) { xen_init_lock_cpu(cpu); + if (xen_feature(XENFEAT_hvm_safe_pvclock)) + xen_setup_timer(cpu); + } break; default: break; diff --git a/trunk/arch/x86/xen/time.c b/trunk/arch/x86/xen/time.c index 0296a9522501..054cc01bb849 100644 --- a/trunk/arch/x86/xen/time.c +++ b/trunk/arch/x86/xen/time.c @@ -497,7 +497,11 @@ static void xen_hvm_setup_cpu_clockevents(void) { int cpu = smp_processor_id(); xen_setup_runstate_info(cpu); - xen_setup_timer(cpu); + /* + * xen_setup_timer(cpu) - snprintf is bad in atomic context. Hence + * doing it xen_hvm_cpu_notify (which gets called by smp_init during + * early bootup and also during CPU hotplug events). + */ xen_setup_cpu_clockevents(); }