public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
@ 2007-03-20 21:48 Rafael J. Wysocki
  2007-03-20 22:01 ` Pavel Machek
  2007-03-21  6:31 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2007-03-20 21:48 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Andrew Morton, LKML

From: Rafael J. Wysocki <rjw@sisk.pl>

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>
---
 kernel/power/user.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6.21-rc4/kernel/power/user.c
===================================================================
--- linux-2.6.21-rc4.orig/kernel/power/user.c
+++ linux-2.6.21-rc4/kernel/power/user.c
@@ -374,9 +374,12 @@ static int snapshot_ioctl(struct inode *
 		if (error) {
 			printk(KERN_ERR "Failed to suspend some devices.\n");
 		} 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 */
 			device_resume();
 		}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-21  8:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 21:48 [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl Rafael J. Wysocki
2007-03-20 22:01 ` Pavel Machek
2007-03-21  6:31 ` Andrew Morton
2007-03-21  8:31   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox