mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Qi Yong <qiyong@fc-cn.com>
Cc: linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux-acpi@vger.kernel.org, Stefan Seyfried <seife@suse.de>
Subject: Re: [PATCH] swsusp: Use platform mode by default
Date: Wed, 17 Oct 2007 19:32:08 +0200	[thread overview]
Message-ID: <200710171932.09123.rjw@sisk.pl> (raw)
In-Reply-To: <20071017034402.GA10260@virgo.fc-cn.com>

On Wednesday, 17 October 2007 05:44, Qi Yong wrote:
> On Wed, Oct 17, 2007 at 10:46:12AM +0800, Qi Yong wrote:
> > On 12/05/2007, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > > On Fri, 11 May 2007, Rafael J. Wysocki wrote:
[--snip--]
> 
> please apply.
> 
> Signed-off-by: Qi Yong <qiyong@fc-cn.com>
> ---

With your patch applied the default for ACPI systems changes from
HIBERNATION_PLATFORM to HIBERNATION_SHUTDOWN.  However,
it has been HIBERNATION_PLATFORM since 2.6.20 and I'd really
prefer it to stay this way.

If HIBERNATION_PLATFORM doesn't work for you, please do
"echo shutdown > /sys/power/disk" before hibernation or, if you use the
userland suspend tools, change the s2disk's configuration file to use the
"shutdown" mode.

> diff --git a/kernel/power/disk.c b/kernel/power/disk.c
> index eb72255..95b66ee 100644
> --- a/kernel/power/disk.c
> +++ b/kernel/power/disk.c
> @@ -61,9 +61,11 @@ void hibernation_set_ops(struct hibernation_ops *ops)
>  	}
>  	mutex_lock(&pm_mutex);
>  	hibernation_ops = ops;
> -	if (ops)
> -		hibernation_mode = HIBERNATION_PLATFORM;
> -	else if (hibernation_mode == HIBERNATION_PLATFORM)
> +
> +	/*
> +	 * Turn off HIBERNATION_PLATFORM if we no longer have any platform ops.
> +	 */
> +	if (!ops && hibernation_mode == HIBERNATION_PLATFORM)
>  		hibernation_mode = HIBERNATION_SHUTDOWN;
>  
>  	mutex_unlock(&pm_mutex);

Greetings,
Rafael

      reply	other threads:[~2007-10-17 17:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 12:23 Rafael J. Wysocki
2006-11-01 12:45 ` Stefan Seyfried
2006-11-01 13:21 ` Pavel Machek
2006-11-02  3:40 ` Len Brown
2007-05-11  8:36   ` Coywolf Qi Hunt
2007-05-11  9:21     ` Rafael J. Wysocki
2007-05-11 16:30       ` Linus Torvalds
2007-05-11 20:08         ` Rafael J. Wysocki
2007-05-11 22:51           ` Linus Torvalds
2007-05-11 23:23             ` Pavel Machek
2007-05-12  3:50               ` Len Brown
2007-05-14  7:50             ` Stefan Seyfried
2007-10-17  2:35               ` Qi Yong
2007-10-17  2:46                 ` Linus Torvalds
2007-05-14  0:36           ` Bill Davidsen
2007-10-17  2:46         ` Qi Yong
2007-10-17  3:44           ` Qi Yong
2007-10-17 17:32             ` Rafael J. Wysocki [this message]

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=200710171932.09123.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=qiyong@fc-cn.com \
    --cc=seife@suse.de \
    --cc=torvalds@linux-foundation.org \
    /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

Powered by JetHome