WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 09/11] xen: suspend: move arch specific pre/post susp

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 09/11] xen: suspend: move arch specific pre/post suspend hooks into generic hooks
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 15 Feb 2011 14:13:23 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 15 Feb 2011 06:23:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297779181.21980.3722.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1297779181.21980.3722.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/xen/manage.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index f61c155..49a7458 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();
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>