aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/manage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index db8c4c4ac880..24177272bcb8 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -37,11 +37,19 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
37#ifdef CONFIG_PM_SLEEP 37#ifdef CONFIG_PM_SLEEP
38static int xen_hvm_suspend(void *data) 38static int xen_hvm_suspend(void *data)
39{ 39{
40 int err;
40 struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; 41 struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
41 int *cancelled = data; 42 int *cancelled = data;
42 43
43 BUG_ON(!irqs_disabled()); 44 BUG_ON(!irqs_disabled());
44 45
46 err = sysdev_suspend(PMSG_SUSPEND);
47 if (err) {
48 printk(KERN_ERR "xen_hvm_suspend: sysdev_suspend failed: %d\n",
49 err);
50 return err;
51 }
52
45 *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); 53 *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
46 54
47 xen_hvm_post_suspend(*cancelled); 55 xen_hvm_post_suspend(*cancelled);
@@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data)
53 xen_timer_resume(); 61 xen_timer_resume();
54 } 62 }
55 63
64 sysdev_resume();
65
56 return 0; 66 return 0;
57} 67}
58 68