summaryrefslogtreecommitdiffstats
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-17 11:04:20 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-02-25 16:43:13 +0000
commit07af38102fc4f260cc5a2418ec833707f53cdf70 (patch)
tree8fb2020dd90901c68bd07a99d89b38b45bdbfcdd /drivers/xen/manage.c
parent82043bb60d24d2897074905c94be5a53071e8913 (diff)
downloadop-kernel-dev-07af38102fc4f260cc5a2418ec833707f53cdf70.zip
op-kernel-dev-07af38102fc4f260cc5a2418ec833707f53cdf70.tar.gz
xen: suspend: move arch specific pre/post suspend hooks into generic hooks
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 33312c0..a6bd2e9 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -39,8 +39,9 @@ struct suspend_info {
unsigned long arg; /* extra hypercall argument */
};
-static void xen_hvm_post_suspend(void)
+static void xen_hvm_post_suspend(int cancelled)
{
+ xen_arch_hvm_post_suspend(cancelled);
gnttab_resume();
}
@@ -48,10 +49,12 @@ static void xen_pre_suspend(void)
{
xen_mm_pin_all();
gnttab_suspend();
+ xen_arch_pre_suspend();
}
-static void xen_post_suspend(void)
+static void xen_post_suspend(int cancelled)
{
+ xen_arch_post_suspend(cancelled);
gnttab_resume();
xen_mm_unpin_all();
}
@@ -78,8 +81,7 @@ static int xen_hvm_suspend(void *data)
*/
si->cancelled = HYPERVISOR_suspend(si->arg);
- xen_arch_hvm_post_suspend(si->cancelled);
- xen_hvm_post_suspend();
+ xen_hvm_post_suspend(si->cancelled);
if (!si->cancelled) {
xen_irq_resume();
@@ -107,7 +109,6 @@ static int xen_suspend(void *data)
}
xen_pre_suspend();
- xen_arch_pre_suspend();
/*
* This hypercall returns 1 if suspend was cancelled
@@ -116,8 +117,7 @@ static int xen_suspend(void *data)
*/
si->cancelled = HYPERVISOR_suspend(si->arg);
- xen_arch_post_suspend(si->cancelled);
- xen_post_suspend();
+ xen_post_suspend(si->cancelled);
if (!si->cancelled) {
xen_irq_resume();
OpenPOWER on IntegriCloud