Commit d07af1f0 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

xen: resume timers on all vcpus

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 9c7a7942
...@@ -38,6 +38,7 @@ void xen_post_suspend(int suspend_cancelled) ...@@ -38,6 +38,7 @@ void xen_post_suspend(int suspend_cancelled)
xen_cpu_initialized_map = cpu_online_map; xen_cpu_initialized_map = cpu_online_map;
#endif #endif
xen_vcpu_restore(); xen_vcpu_restore();
xen_timer_resume();
} }
} }
......
...@@ -572,6 +572,19 @@ void xen_setup_cpu_clockevents(void) ...@@ -572,6 +572,19 @@ void xen_setup_cpu_clockevents(void)
clockevents_register_device(&__get_cpu_var(xen_clock_events)); 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) __init void xen_time_init(void)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
......
...@@ -37,6 +37,7 @@ void __init xen_time_init(void); ...@@ -37,6 +37,7 @@ void __init xen_time_init(void);
unsigned long xen_get_wallclock(void); unsigned long xen_get_wallclock(void);
int xen_set_wallclock(unsigned long time); int xen_set_wallclock(unsigned long time);
unsigned long long xen_sched_clock(void); unsigned long long xen_sched_clock(void);
void xen_timer_resume(void);
irqreturn_t xen_debug_interrupt(int irq, void *dev_id); irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment