From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
Date: Tue, 20 Mar 2007 22:48:08 +0100 [thread overview]
Message-ID: <200703202248.08665.rjw@sisk.pl> (raw)
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();
}
next reply other threads:[~2007-03-20 21:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 21:48 Rafael J. Wysocki [this message]
2007-03-20 22:01 ` [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl Pavel Machek
2007-03-21 6:31 ` Andrew Morton
2007-03-21 8:31 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703202248.08665.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox