diff options
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r-- | drivers/xen/manage.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 9b91617b9582..3ccd348d112d 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -45,6 +45,13 @@ static int xen_suspend(void *data) | |||
45 | err); | 45 | err); |
46 | return err; | 46 | return err; |
47 | } | 47 | } |
48 | err = sysdev_suspend(PMSG_SUSPEND); | ||
49 | if (err) { | ||
50 | printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", | ||
51 | err); | ||
52 | device_power_up(PMSG_RESUME); | ||
53 | return err; | ||
54 | } | ||
48 | 55 | ||
49 | xen_mm_pin_all(); | 56 | xen_mm_pin_all(); |
50 | gnttab_suspend(); | 57 | gnttab_suspend(); |
@@ -61,6 +68,7 @@ static int xen_suspend(void *data) | |||
61 | gnttab_resume(); | 68 | gnttab_resume(); |
62 | xen_mm_unpin_all(); | 69 | xen_mm_unpin_all(); |
63 | 70 | ||
71 | sysdev_resume(); | ||
64 | device_power_up(PMSG_RESUME); | 72 | device_power_up(PMSG_RESUME); |
65 | 73 | ||
66 | if (!*cancelled) { | 74 | if (!*cancelled) { |
@@ -100,7 +108,7 @@ static void do_suspend(void) | |||
100 | /* XXX use normal device tree? */ | 108 | /* XXX use normal device tree? */ |
101 | xenbus_suspend(); | 109 | xenbus_suspend(); |
102 | 110 | ||
103 | err = stop_machine(xen_suspend, &cancelled, &cpumask_of_cpu(0)); | 111 | err = stop_machine(xen_suspend, &cancelled, cpumask_of(0)); |
104 | if (err) { | 112 | if (err) { |
105 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); | 113 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); |
106 | goto out; | 114 | goto out; |