]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
xen: resume timers on all vcpus
authorJeremy Fitzhardinge <jeremy@goop.org>
Sat, 31 May 2008 00:33:03 +0000 (01:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 2 Jun 2008 11:25:44 +0000 (13:25 +0200)
On resume, the vcpu timer modes will not be restored.  The timer
infrastructure doesn't do this for us, since it assumes the cpus
are offline.  We can just poke the other vcpus into the right mode
directly though.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/xen/suspend.c
arch/x86/xen/time.c
arch/x86/xen/xen-ops.h

index 7ab10f6b39a5dedc7ac25e6d14bdfb24b619678a..251669a932d4c440f39cc361374ddf59816d0676 100644 (file)
@@ -38,6 +38,7 @@ void xen_post_suspend(int suspend_cancelled)
                xen_cpu_initialized_map = cpu_online_map;
 #endif
                xen_vcpu_restore();
+               xen_timer_resume();
        }
 
 }
index c39e1a5aa241bcce2cb2a070d2dbbe391a28ae31..ea137fb660c069f3d8ad4a70873a9e444c410c1d 100644 (file)
@@ -572,6 +572,19 @@ void xen_setup_cpu_clockevents(void)
        clockevents_register_device(&__get_cpu_var(xen_clock_events));
 }
 
+void xen_timer_resume(void)
+{
+       int cpu;
+
+       if (xen_clockevent != &xen_vcpuop_clockevent)
+               return;
+
+       for_each_online_cpu(cpu) {
+               if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
+                       BUG();
+       }
+}
+
 __init void xen_time_init(void)
 {
        int cpu = smp_processor_id();
index a457e03e1b2170075f3180ae881256dfc3385cde..9a055592a3074243e0702715ce95c93ef74224dc 100644 (file)
@@ -37,6 +37,7 @@ void __init xen_time_init(void);
 unsigned long xen_get_wallclock(void);
 int xen_set_wallclock(unsigned long time);
 unsigned long long xen_sched_clock(void);
+void xen_timer_resume(void);
 
 irqreturn_t xen_debug_interrupt(int irq, void *dev_id);