summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-03-22 09:11:20 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-23 03:39:05 +0100
commit93c9a7ff50a5b39dbdf80129c5da89e6d6256bea (patch)
tree8bc951687be367c0a736a9a6165c67baf92d7621 /kernel
parent[PATCH] Documentation/sysrq.txt: added short description for 'Q' (timerlist) (diff)
downloadlinux-93c9a7ff50a5b39dbdf80129c5da89e6d6256bea.tar.xz
linux-93c9a7ff50a5b39dbdf80129c5da89e6d6256bea.zip
[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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/user.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index d6a8dcc26ae5..bf211fee1222 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();
}