Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234231
b: refs/heads/master
c: 82043bb
h: refs/heads/master
i:
  234229: 61b6353
  234227: 9680736
  234223: bed15a0
v: v3
  • Loading branch information
Ian Campbell authored and Stefano Stabellini committed Feb 25, 2011
1 parent 8366894 commit 73c3d65
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03c8142bd2fb3b87effa6ecb2f8957be588bc85f
refs/heads/master: 82043bb60d24d2897074905c94be5a53071e8913
25 changes: 20 additions & 5 deletions trunk/drivers/xen/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ struct suspend_info {
unsigned long arg; /* extra hypercall argument */
};

static void xen_hvm_post_suspend(void)
{
gnttab_resume();
}

static void xen_pre_suspend(void)
{
xen_mm_pin_all();
gnttab_suspend();
}

static void xen_post_suspend(void)
{
gnttab_resume();
xen_mm_unpin_all();
}

#ifdef CONFIG_PM_SLEEP
static int xen_hvm_suspend(void *data)
{
Expand All @@ -62,7 +79,7 @@ static int xen_hvm_suspend(void *data)
si->cancelled = HYPERVISOR_suspend(si->arg);

xen_arch_hvm_post_suspend(si->cancelled);
gnttab_resume();
xen_hvm_post_suspend();

if (!si->cancelled) {
xen_irq_resume();
Expand All @@ -89,8 +106,7 @@ static int xen_suspend(void *data)
return err;
}

xen_mm_pin_all();
gnttab_suspend();
xen_pre_suspend();
xen_arch_pre_suspend();

/*
Expand All @@ -101,8 +117,7 @@ static int xen_suspend(void *data)
si->cancelled = HYPERVISOR_suspend(si->arg);

xen_arch_post_suspend(si->cancelled);
gnttab_resume();
xen_mm_unpin_all();
xen_post_suspend();

if (!si->cancelled) {
xen_irq_resume();
Expand Down

0 comments on commit 73c3d65

Please sign in to comment.