Browse Source

[PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl

The SNAPSHOT_S2RAM ioctl does not disable the nonboot CPUs before entering
the suspend, although it should do this.

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>
Rafael J. Wysocki 18 years ago
parent
commit
93c9a7ff50
1 changed files with 6 additions and 3 deletions
  1. 6 3
      kernel/power/user.c

+ 6 - 3
kernel/power/user.c

@@ -368,9 +368,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
 		if (error) {
 		if (error) {
 			printk(KERN_ERR "Failed to suspend some devices.\n");
 			printk(KERN_ERR "Failed to suspend some devices.\n");
 		} else {
 		} else {
-			/* Enter S3, system is already frozen */
-			suspend_enter(PM_SUSPEND_MEM);
-
+			error = disable_nonboot_cpus();
+			if (!error) {
+				/* Enter S3, system is already frozen */
+				suspend_enter(PM_SUSPEND_MEM);
+				enable_nonboot_cpus();
+			}
 			/* Wake up devices */
 			/* Wake up devices */
 			device_resume();
 			device_resume();
 		}
 		}