xen: suspend: remove xen_hvm_suspend
authorIan Campbell <ian.campbell@citrix.com>
Thu, 17 Feb 2011 11:04:20 +0000 (11:04 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 25 Feb 2011 16:43:14 +0000 (16:43 +0000)
It is now identical to xen_suspend, the differences are encapsulated
in the suspend_info struct.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/manage.c

index 5b7a0a9402e704b9b5616766632a498a49816088..ebb292859b59cdfcfcd915e5e774895231aa9f32 100644 (file)
@@ -62,44 +62,6 @@ static void xen_post_suspend(int cancelled)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static int xen_hvm_suspend(void *data)
-{
-       struct suspend_info *si = data;
-       int err;
-
-       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;
-       }
-
-       if (si->pre)
-               si->pre();
-
-       /*
-        * This hypercall returns 1 if suspend was cancelled
-        * or the domain was merely checkpointed, and 0 if it
-        * is resuming in a new domain.
-        */
-       si->cancelled = HYPERVISOR_suspend(si->arg);
-
-       if (si->post)
-               si->post(si->cancelled);
-
-       if (!si->cancelled) {
-               xen_irq_resume();
-               xen_console_resume();
-               xen_timer_resume();
-       }
-
-       sysdev_resume();
-
-       return 0;
-}
-
 static int xen_suspend(void *data)
 {
        struct suspend_info *si = data;
@@ -183,10 +145,7 @@ static void do_suspend(void)
                si.post = &xen_post_suspend;
        }
 
-       if (xen_hvm_domain())
-               err = stop_machine(xen_hvm_suspend, &si, cpumask_of(0));
-       else
-               err = stop_machine(xen_suspend, &si, cpumask_of(0));
+       err = stop_machine(xen_suspend, &si, cpumask_of(0));
 
        dpm_resume_noirq(PMSG_RESUME);