diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-02-17 06:04:20 -0500 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-02-25 11:43:14 -0500 |
commit | b056b6a0144de90707cd22cf7b4f60bf69c86d59 (patch) | |
tree | 11d86bf4a7acb267ee72a1e8f4c92622d93f7f97 | |
parent | 55fb4acef7089a6d4d93ed8caae6c258d06cfaf7 (diff) |
xen: suspend: remove xen_hvm_suspend
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>
-rw-r--r-- | drivers/xen/manage.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 5b7a0a9402e7..ebb292859b59 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -62,44 +62,6 @@ static void xen_post_suspend(int cancelled) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | #ifdef CONFIG_PM_SLEEP | 64 | #ifdef CONFIG_PM_SLEEP |
65 | static int xen_hvm_suspend(void *data) | ||
66 | { | ||
67 | struct suspend_info *si = data; | ||
68 | int err; | ||
69 | |||
70 | BUG_ON(!irqs_disabled()); | ||
71 | |||
72 | err = sysdev_suspend(PMSG_SUSPEND); | ||
73 | if (err) { | ||
74 | printk(KERN_ERR "xen_hvm_suspend: sysdev_suspend failed: %d\n", | ||
75 | err); | ||
76 | return err; | ||
77 | } | ||
78 | |||
79 | if (si->pre) | ||
80 | si->pre(); | ||
81 | |||
82 | /* | ||
83 | * This hypercall returns 1 if suspend was cancelled | ||
84 | * or the domain was merely checkpointed, and 0 if it | ||
85 | * is resuming in a new domain. | ||
86 | */ | ||
87 | si->cancelled = HYPERVISOR_suspend(si->arg); | ||
88 | |||
89 | if (si->post) | ||
90 | si->post(si->cancelled); | ||
91 | |||
92 | if (!si->cancelled) { | ||
93 | xen_irq_resume(); | ||
94 | xen_console_resume(); | ||
95 | xen_timer_resume(); | ||
96 | } | ||
97 | |||
98 | sysdev_resume(); | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static int xen_suspend(void *data) | 65 | static int xen_suspend(void *data) |
104 | { | 66 | { |
105 | struct suspend_info *si = data; | 67 | struct suspend_info *si = data; |
@@ -183,10 +145,7 @@ static void do_suspend(void) | |||
183 | si.post = &xen_post_suspend; | 145 | si.post = &xen_post_suspend; |
184 | } | 146 | } |
185 | 147 | ||
186 | if (xen_hvm_domain()) | 148 | err = stop_machine(xen_suspend, &si, cpumask_of(0)); |
187 | err = stop_machine(xen_hvm_suspend, &si, cpumask_of(0)); | ||
188 | else | ||
189 | err = stop_machine(xen_suspend, &si, cpumask_of(0)); | ||
190 | 149 | ||
191 | dpm_resume_noirq(PMSG_RESUME); | 150 | dpm_resume_noirq(PMSG_RESUME); |
192 | 151 | ||