aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-05-26 18:31:28 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-27 04:11:38 -0400
commit359cdd3f866b6219a6729e313faf2221397f3278 (patch)
treeec052599c175ee1ef0a2221670f18f6dad95cc77 /drivers
parent0e91398f2a5d4eb6b07df8115917d0d1cf3e9b58 (diff)
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 ba85fa2cff33..675c3dd23962 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -34,14 +34,21 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
34static int xen_suspend(void *data) 34static int xen_suspend(void *data)
35{ 35{
36 int *cancelled = data; 36 int *cancelled = data;
37 int err;
37 38
38 BUG_ON(!irqs_disabled()); 39 BUG_ON(!irqs_disabled());
39 40
40 load_cr3(swapper_pg_dir); 41 load_cr3(swapper_pg_dir);
41 42
43 err = device_power_down(PMSG_SUSPEND);
44 if (err) {
45 printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n",
46 err);
47 return err;
48 }
49
42 xen_mm_pin_all(); 50 xen_mm_pin_all();
43 gnttab_suspend(); 51 gnttab_suspend();
44 xen_time_suspend();
45 xen_pre_suspend(); 52 xen_pre_suspend();
46 53
47 /* 54 /*
@@ -52,10 +59,11 @@ static int xen_suspend(void *data)
52 *cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info)); 59 *cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
53 60
54 xen_post_suspend(*cancelled); 61 xen_post_suspend(*cancelled);
55 xen_time_resume();
56 gnttab_resume(); 62 gnttab_resume();
57 xen_mm_unpin_all(); 63 xen_mm_unpin_all();
58 64
65 device_power_up();
66
59 if (!*cancelled) { 67 if (!*cancelled) {
60 xen_irq_resume(); 68 xen_irq_resume();
61 xen_console_resume(); 69 xen_console_resume();
@@ -105,7 +113,8 @@ static void do_suspend(void)
105 113
106 device_resume(); 114 device_resume();
107 115
108 116 /* Make sure timer events get retriggered on all CPUs */
117 clock_was_set();
109out: 118out:
110#ifdef CONFIG_PREEMPT 119#ifdef CONFIG_PREEMPT
111 thaw_processes(); 120 thaw_processes();