aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-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();