swsusp: Fix SNAPSHOT_S2RAM ioctl
Subsystems (2)
PATCH 1/1 swsusp: Fix SNAPSHOT_S2RAM ioctl
From: Rafael J. Wysocki <[email protected]>
The SNAPSHOT_S2RAM ioctl does not disable the nonboot CPUs before entering the suspend, although it should do this.
--- kernel/power/user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
kernel/power/user.c +6 -3
@@ -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 (); }
Hi!
Quoted 8 lines
From: Rafael J. Wysocki <[email protected]>
The
SNAPSHOT_S2RAMioctl does not disable the nonboot CPUs before entering the suspend, although it should do this.kernel/power/user.c +0
-2}else { -/* Enter S3, system is already frozen */ -suspend_enter (PM_SUSPEND_MEM );
kernel/power/user.c static int snapshot_ioctl(struct inode * · line 385
Quoted 10 lines
kernel/power/user.c +6
-1- + 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 (); }
Looks ok to me. ACK.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 20 lines · On Tue, 20 Mar 2007 22:48:08 +0100 "Rafael J. Wysocki" <[email protected]> wrote:
From: Rafael J. Wysocki <[email protected]>
The
SNAPSHOT_S2RAMioctl does not disable the nonboot CPUs before entering the suspend, although it should do this.Signed-off-by Rafael J. Wysocki <[email protected]>--- kernel/power/user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)Index:
linux-2.6.21-rc4/kernel/power/user.c
===================================================================kernel/power/user.c +0
-2@@ -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 );
kernel/power/user.c static int snapshot_ioctl(struct inode * · line 385
Quoted 10 lines
kernel/power/user.c +6
-1- + 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 (); }
Do you consider this appropriate to 2.6.21?
Hi!
Quoted 17 lines
Quoted 17 lines
From: Rafael J. Wysocki <[email protected]>
The
SNAPSHOT_S2RAMioctl does not disable the nonboot CPUs before entering the suspend, although it should do this.kernel/power/user.c +3
-3@@ -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 */
Quoted 8 lines
kernel/power/user.c static int snapshot_ioctl(struct inode * · line 385
Quoted 6 lines
kernel/power/user.c +3
-0+suspend_enter (PM_SUSPEND_MEM ); +enable_nonboot_cpus (); + }/* Wake up devices */ device_resume (); }Do you consider this appropriate to 2.6.21?
Yes, this one is.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html