aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-05-26 23:31:28 +0100
committerThomas Gleixner <tglx@linutronix.de>2008-05-27 10:11:38 +0200
commit359cdd3f866b6219a6729e313faf2221397f3278 (patch)
treeec052599c175ee1ef0a2221670f18f6dad95cc77 /drivers
parent0e91398f2a5d4eb6b07df8115917d0d1cf3e9b58 (diff)
downloadkernel_samsung_smdk4412-359cdd3f866b6219a6729e313faf2221397f3278.zip
kernel_samsung_smdk4412-359cdd3f866b6219a6729e313faf2221397f3278.tar.gz
kernel_samsung_smdk4412-359cdd3f866b6219a6729e313faf2221397f3278.tar.bz2
xen: maintain clock offset over save/restore
Hook into the device model to make sure that timekeeping's resume handler is called. This deals with our clocksource's non-monotonicity over the save/restore. Explicitly call clock_has_changed() to make sure that all the timers get retriggered properly. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/manage.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index ba85fa2..675c3dd 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -34,14 +34,21 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
static int xen_suspend(void *data)
{
int *cancelled = data;
+ int err;
BUG_ON(!irqs_disabled());
load_cr3(swapper_pg_dir);
+ err = device_power_down(PMSG_SUSPEND);
+ if (err) {
+ printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n",
+ err);
+ return err;
+ }
+
xen_mm_pin_all();
gnttab_suspend();
- xen_time_suspend();
xen_pre_suspend();
/*
@@ -52,10 +59,11 @@ static int xen_suspend(void *data)
*cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
xen_post_suspend(*cancelled);
- xen_time_resume();
gnttab_resume();
xen_mm_unpin_all();
+ device_power_up();
+
if (!*cancelled) {
xen_irq_resume();
xen_console_resume();
@@ -105,7 +113,8 @@ static void do_suspend(void)
device_resume();
-
+ /* Make sure timer events get retriggered on all CPUs */
+ clock_was_set();
out:
#ifdef CONFIG_PREEMPT
thaw_processes();