Commit 94985134 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

[PATCH] swsusp: disable nonboot CPUs before entering platform suspend

Prevent the WARN_ON() in arch/x86_64/kernel/acpi/sleep.c:init_low_mapping()
from triggering by disabling nonboot CPUs before we finally enter the
platform suspend.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 886c5952
...@@ -58,6 +58,7 @@ static inline int platform_prepare(void) ...@@ -58,6 +58,7 @@ static inline int platform_prepare(void)
static void power_down(suspend_disk_method_t mode) static void power_down(suspend_disk_method_t mode)
{ {
disable_nonboot_cpus();
switch(mode) { switch(mode) {
case PM_DISK_PLATFORM: case PM_DISK_PLATFORM:
if (pm_ops && pm_ops->enter) { if (pm_ops && pm_ops->enter) {
......
...@@ -398,9 +398,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, ...@@ -398,9 +398,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
case PMOPS_ENTER: case PMOPS_ENTER:
if (data->platform_suspend) { if (data->platform_suspend) {
disable_nonboot_cpus();
kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
error = pm_ops->enter(PM_SUSPEND_DISK); error = pm_ops->enter(PM_SUSPEND_DISK);
error = 0; enable_nonboot_cpus();
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment