Loading drivers/xen/manage.c +10 −0 Original line number Original line Diff line number Diff line Loading @@ -37,11 +37,19 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID; #ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP static int xen_hvm_suspend(void *data) static int xen_hvm_suspend(void *data) { { int err; struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; int *cancelled = data; int *cancelled = data; BUG_ON(!irqs_disabled()); 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; } *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); xen_hvm_post_suspend(*cancelled); xen_hvm_post_suspend(*cancelled); Loading @@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data) xen_timer_resume(); xen_timer_resume(); } } sysdev_resume(); return 0; return 0; } } Loading Loading
drivers/xen/manage.c +10 −0 Original line number Original line Diff line number Diff line Loading @@ -37,11 +37,19 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID; #ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP static int xen_hvm_suspend(void *data) static int xen_hvm_suspend(void *data) { { int err; struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; int *cancelled = data; int *cancelled = data; BUG_ON(!irqs_disabled()); 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; } *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); xen_hvm_post_suspend(*cancelled); xen_hvm_post_suspend(*cancelled); Loading @@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data) xen_timer_resume(); xen_timer_resume(); } } sysdev_resume(); return 0; return 0; } } Loading