aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-17 06:04:20 -0500
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-02-25 11:43:13 -0500
commit07af38102fc4f260cc5a2418ec833707f53cdf70 (patch)
tree8fb2020dd90901c68bd07a99d89b38b45bdbfcdd /drivers
parent82043bb60d24d2897074905c94be5a53071e8913 (diff)
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')
-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 33312c09829e..a6bd2e9ca106 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -39,8 +39,9 @@ struct suspend_info {
39 unsigned long arg; /* extra hypercall argument */ 39 unsigned long arg; /* extra hypercall argument */
40}; 40};
41 41
42static void xen_hvm_post_suspend(void) 42static void xen_hvm_post_suspend(int cancelled)
43{ 43{
44 xen_arch_hvm_post_suspend(cancelled);
44 gnttab_resume(); 45 gnttab_resume();
45} 46}
46 47
@@ -48,10 +49,12 @@ static void xen_pre_suspend(void)
48{ 49{
49 xen_mm_pin_all(); 50 xen_mm_pin_all();
50 gnttab_suspend(); 51 gnttab_suspend();
52 xen_arch_pre_suspend();
51} 53}
52 54
53static void xen_post_suspend(void) 55static void xen_post_suspend(int cancelled)
54{ 56{
57 xen_arch_post_suspend(cancelled);
55 gnttab_resume(); 58 gnttab_resume();
56 xen_mm_unpin_all(); 59 xen_mm_unpin_all();
57} 60}
@@ -78,8 +81,7 @@ static int xen_hvm_suspend(void *data)
78 */ 81 */
79 si->cancelled = HYPERVISOR_suspend(si->arg); 82 si->cancelled = HYPERVISOR_suspend(si->arg);
80 83
81 xen_arch_hvm_post_suspend(si->cancelled); 84 xen_hvm_post_suspend(si->cancelled);
82 xen_hvm_post_suspend();
83 85
84 if (!si->cancelled) { 86 if (!si->cancelled) {
85 xen_irq_resume(); 87 xen_irq_resume();
@@ -107,7 +109,6 @@ static int xen_suspend(void *data)
107 } 109 }
108 110
109 xen_pre_suspend(); 111 xen_pre_suspend();
110 xen_arch_pre_suspend();
111 112
112 /* 113 /*
113 * This hypercall returns 1 if suspend was cancelled 114 * This hypercall returns 1 if suspend was cancelled
@@ -116,8 +117,7 @@ static int xen_suspend(void *data)
116 */ 117 */
117 si->cancelled = HYPERVISOR_suspend(si->arg); 118 si->cancelled = HYPERVISOR_suspend(si->arg);
118 119
119 xen_arch_post_suspend(si->cancelled); 120 xen_post_suspend(si->cancelled);
120 xen_post_suspend();
121 121
122 if (!si->cancelled) { 122 if (!si->cancelled) {
123 xen_irq_resume(); 123 xen_irq_resume();