aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kexec.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-04-19 18:36:11 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-04-19 18:36:11 -0400
commit19234c0819da0e043a02710488dfd9b242b42eba (patch)
treec55331dd010e5fe257e001261f1a31f53f62dff4 /kernel/kexec.c
parent2ca6f62f595c01f689b269db6736de5544da7667 (diff)
PM: Add missing syscore_suspend() and syscore_resume() calls
Device suspend/resume infrastructure is used not only by the suspend and hibernate code in kernel/power, but also by APM, Xen and the kexec jump feature. However, commit 40dc166cb5dddbd36aa4ad11c03915ea (PM / Core: Introduce struct syscore_ops for core subsystems PM) failed to add syscore_suspend() and syscore_resume() calls to that code, which generally leads to breakage when the features in question are used. To fix this problem, add the missing syscore_suspend() and syscore_resume() calls to arch/x86/kernel/apm_32.c, kernel/kexec.c and drivers/xen/manage.c. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r--kernel/kexec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 55936f9cb25..87b77de03dd 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -33,6 +33,7 @@
33#include <linux/vmalloc.h> 33#include <linux/vmalloc.h>
34#include <linux/swap.h> 34#include <linux/swap.h>
35#include <linux/kmsg_dump.h> 35#include <linux/kmsg_dump.h>
36#include <linux/syscore_ops.h>
36 37
37#include <asm/page.h> 38#include <asm/page.h>
38#include <asm/uaccess.h> 39#include <asm/uaccess.h>
@@ -1532,6 +1533,11 @@ int kernel_kexec(void)
1532 local_irq_disable(); 1533 local_irq_disable();
1533 /* Suspend system devices */ 1534 /* Suspend system devices */
1534 error = sysdev_suspend(PMSG_FREEZE); 1535 error = sysdev_suspend(PMSG_FREEZE);
1536 if (!error) {
1537 error = syscore_suspend();
1538 if (error)
1539 sysdev_resume();
1540 }
1535 if (error) 1541 if (error)
1536 goto Enable_irqs; 1542 goto Enable_irqs;
1537 } else 1543 } else
@@ -1546,6 +1552,7 @@ int kernel_kexec(void)
1546 1552
1547#ifdef CONFIG_KEXEC_JUMP 1553#ifdef CONFIG_KEXEC_JUMP
1548 if (kexec_image->preserve_context) { 1554 if (kexec_image->preserve_context) {
1555 syscore_resume();
1549 sysdev_resume(); 1556 sysdev_resume();
1550 Enable_irqs: 1557 Enable_irqs:
1551 local_irq_enable(); 1558 local_irq_enable();