[PATCH] swsusp: disable nonboot CPUs before entering platform suspend
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 16 Mar 2007 21:38:06 +0000 (13:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 17 Mar 2007 02:25:03 +0000 (19:25 -0700)
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: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/disk.c
kernel/power/user.c

index a200c5fc42eedd67e8157bcbc6943d9baf7c7d87..873cdf8ea5a419ff5003da0754891bf3382387c7 100644 (file)
@@ -58,6 +58,7 @@ static inline int platform_prepare(void)
 
 static void power_down(suspend_disk_method_t mode)
 {
+       disable_nonboot_cpus();
        switch(mode) {
        case PM_DISK_PLATFORM:
                if (pm_ops && pm_ops->enter) {
index dd09efe7df54352fac2a621c3cef33286dd4d63a..d6a8dcc26ae552d94f38d456b38a5ce1821e4071 100644 (file)
@@ -398,9 +398,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
 
                case PMOPS_ENTER:
                        if (data->platform_suspend) {
+                               disable_nonboot_cpus();
                                kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
                                error = pm_ops->enter(PM_SUSPEND_DISK);
-                               error = 0;
+                               enable_nonboot_cpus();
                        }
                        break;