summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-18 23:44:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-18 23:44:41 +0300
commita5bbef0b2deb7b943f095181309ecc9e1fc91c0f (patch)
treea64e846b183cb98ce34eb8c32258466639274bed
parentbc3adfc6703edfd2484902b5391092c717076f87 (diff)
parent8dd38383a51d0fb6b025dc330aaa3470281da3b2 (diff)
downloadlinux-a5bbef0b2deb7b943f095181309ecc9e1fc91c0f.tar.xz
Merge branch 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6
* 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6: xen: suspend and resume system devices when running PVHVM
-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;
#ifdef CONFIG_PM_SLEEP
static int xen_hvm_suspend(void *data)
{
+ int err;
struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
int *cancelled = data;
BUG_ON(!irqs_disabled());
+ err = sysdev_suspend(PMSG_SUSPEND);
+ if (err) {
+ printk(KERN_ERR "xen_hvm_suspend: sysdev_suspend failed: %d\n",
+ err);
+ return err;
+ }
+
*cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
xen_hvm_post_suspend(*cancelled);
@@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data)
xen_timer_resume();
}
+ sysdev_resume();
+
return 0;
}