From: Rafael J. Wysocki Date: Thu, 22 Mar 2007 08:11:20 +0000 (-0800) Subject: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl X-Git-Tag: v2.6.21-rc5~41 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=93c9a7ff50a5b39dbdf80129c5da89e6d6256bea;p=powerpc.git [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 Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/user.c b/kernel/power/user.c index d6a8dcc26a..bf211fee12 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -368,9 +368,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, 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(); }