LKML Archive on lore.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
* Re: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
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
1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2007-03-20 22:01 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Andrew Morton, LKML
Hi!
> 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.
>
> } 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();
> }
Looks ok to me. ACK.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
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
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2007-03-21 6:31 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Pavel Machek, LKML
On Tue, 20 Mar 2007 22:48:08 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 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();
> }
Do you consider this appropriate to 2.6.21?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
2007-03-21 6:31 ` Andrew Morton
@ 2007-03-21 8:31 ` Pavel Machek
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2007-03-21 8:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: Rafael J. Wysocki, LKML
Hi!
> > 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.
> >
> > --- 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();
> > }
>
> Do you consider this appropriate to 2.6.21?
Yes, this one is.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ 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;
as well as URLs for NNTP newsgroup(s).