All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Adrian Bunk <bunk@stusta.de>,
	Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION
Date: Sun, 5 Aug 2007 00:09:09 +0200	[thread overview]
Message-ID: <200708050009.10769.rjw@sisk.pl> (raw)
In-Reply-To: <200708041148.48357.rjw@sisk.pl>

On Saturday, 4 August 2007 11:48, Rafael J. Wysocki wrote:
> On Saturday, 4 August 2007 05:45, Len Brown wrote:
> > On Friday 03 August 2007 18:47, Rafael J. Wysocki wrote:
> > > On Saturday, 4 August 2007 00:01, Linus Torvalds wrote:
> > > > On Fri, 3 Aug 2007, Rafael J. Wysocki wrote:
> [--snip--]
> > >  
> > > +config SUSPEND_UP_POSSIBLE
> > > +	bool
> > > +	depends on BLACKFIN || MIPS || SUPERH || FRV || (PPC32 && PPC_MPC52xx)
> > 
> > please include (X86 && !X86_VOYAGER) here -- else you'll disable
> > SUSPEND from all X86 when built UP.
> 
> Right.  I think I should include everything that can do SMP suspend here.
> 
> Updated patch is appended.

Well, unfortunately, the patch below is buggy, because I need to change
CONFIG_SUSPEND_SMP into CONFIG_PM_SLEEP_SMP in some more places.

I'll send an updated version in a new thread.

Greetings,
Rafael


> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit
> 296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for
> suspend-to-Ram and standby" are incorrect, as they don't cover the facts that
> (1) not all architectures support suspend and (2) SMP hibernation is only
> possible on X86 and PPC64 (if PPC64_SWSUSP is set).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  kernel/power/Kconfig |   42 ++++++++++++++++++++++++++++++++----------
>  1 file changed, 32 insertions(+), 10 deletions(-)
> 
> Index: linux-2.6/kernel/power/Kconfig
> ===================================================================
> --- linux-2.6.orig/kernel/power/Kconfig
> +++ linux-2.6/kernel/power/Kconfig
> @@ -72,15 +72,10 @@ config PM_TRACE
>  	CAUTION: this option will cause your machine's real-time clock to be
>  	set to an invalid time after a resume.
>  
> -config SUSPEND_SMP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
> -	depends on SMP
> -	default y
> -
> -config SUSPEND_SMP
> +config PM_SLEEP_SMP
>  	bool
> -	depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
> +	depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
> +	depends on PM_SLEEP
>  	select HOTPLUG_CPU
>  	default y
>  
> @@ -89,20 +84,47 @@ config PM_SLEEP
>  	depends on SUSPEND || HIBERNATION
>  	default y
>  
> +config SUSPEND_UP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) || (PPC32 && PPC_MPC52xx) \
> +		   || (PPC64 && (PPC_PSERIES || PPC_PMAC)) || ARM || BLACKFIN \
> +		   || MIPS || SUPERH || FRV
> +	depends on !SMP
> +	default y
> +
> +config SUSPEND_SMP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) \
> +		   || (PPC64 && (PPC_PSERIES || PPC_PMAC)) || ARM
> +	depends on SMP
> +	default y
> +
>  config SUSPEND
>  	bool "Suspend to RAM and standby"
>  	depends on PM
> -	depends on !SMP || SUSPEND_SMP_POSSIBLE
> +	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
>  	default y
>  	---help---
>  	  Allow the system to enter sleep states in which main memory is
>  	  powered and thus its contents are preserved, such as the
>  	  suspend-to-RAM state (i.e. the ACPI S3 state).
>  
> +config HIBERNATION_UP_POSSIBLE
> +	bool
> +	depends on X86 || PPC64_SWSUSP || FRV || PPC32
> +	depends on !SMP
> +	default y
> +
> +config HIBERNATION_SMP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP
> +	depends on SMP
> +	default y
> +
>  config HIBERNATION
>  	bool "Hibernation (aka 'suspend to disk')"
>  	depends on PM && SWAP
> -	depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || SUSPEND_SMP_POSSIBLE
> +	depends on HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
>  	---help---
>  	  Enable the suspend to disk (STD) functionality, which is usually
>  	  called "hibernation" in user interfaces.  STD checkpoints the
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

-- 
"Premature optimization is the root of all evil." - Donald Knuth

WARNING: multiple messages have this Message-ID (diff)
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Adrian Bunk <bunk@stusta.de>
Subject: Re: [PATCH] PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION
Date: Sun, 5 Aug 2007 00:09:09 +0200	[thread overview]
Message-ID: <200708050009.10769.rjw@sisk.pl> (raw)
In-Reply-To: <200708041148.48357.rjw@sisk.pl>

On Saturday, 4 August 2007 11:48, Rafael J. Wysocki wrote:
> On Saturday, 4 August 2007 05:45, Len Brown wrote:
> > On Friday 03 August 2007 18:47, Rafael J. Wysocki wrote:
> > > On Saturday, 4 August 2007 00:01, Linus Torvalds wrote:
> > > > On Fri, 3 Aug 2007, Rafael J. Wysocki wrote:
> [--snip--]
> > >  
> > > +config SUSPEND_UP_POSSIBLE
> > > +	bool
> > > +	depends on BLACKFIN || MIPS || SUPERH || FRV || (PPC32 && PPC_MPC52xx)
> > 
> > please include (X86 && !X86_VOYAGER) here -- else you'll disable
> > SUSPEND from all X86 when built UP.
> 
> Right.  I think I should include everything that can do SMP suspend here.
> 
> Updated patch is appended.

Well, unfortunately, the patch below is buggy, because I need to change
CONFIG_SUSPEND_SMP into CONFIG_PM_SLEEP_SMP in some more places.

I'll send an updated version in a new thread.

Greetings,
Rafael


> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit
> 296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for
> suspend-to-Ram and standby" are incorrect, as they don't cover the facts that
> (1) not all architectures support suspend and (2) SMP hibernation is only
> possible on X86 and PPC64 (if PPC64_SWSUSP is set).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  kernel/power/Kconfig |   42 ++++++++++++++++++++++++++++++++----------
>  1 file changed, 32 insertions(+), 10 deletions(-)
> 
> Index: linux-2.6/kernel/power/Kconfig
> ===================================================================
> --- linux-2.6.orig/kernel/power/Kconfig
> +++ linux-2.6/kernel/power/Kconfig
> @@ -72,15 +72,10 @@ config PM_TRACE
>  	CAUTION: this option will cause your machine's real-time clock to be
>  	set to an invalid time after a resume.
>  
> -config SUSPEND_SMP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
> -	depends on SMP
> -	default y
> -
> -config SUSPEND_SMP
> +config PM_SLEEP_SMP
>  	bool
> -	depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
> +	depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
> +	depends on PM_SLEEP
>  	select HOTPLUG_CPU
>  	default y
>  
> @@ -89,20 +84,47 @@ config PM_SLEEP
>  	depends on SUSPEND || HIBERNATION
>  	default y
>  
> +config SUSPEND_UP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) || (PPC32 && PPC_MPC52xx) \
> +		   || (PPC64 && (PPC_PSERIES || PPC_PMAC)) || ARM || BLACKFIN \
> +		   || MIPS || SUPERH || FRV
> +	depends on !SMP
> +	default y
> +
> +config SUSPEND_SMP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) \
> +		   || (PPC64 && (PPC_PSERIES || PPC_PMAC)) || ARM
> +	depends on SMP
> +	default y
> +
>  config SUSPEND
>  	bool "Suspend to RAM and standby"
>  	depends on PM
> -	depends on !SMP || SUSPEND_SMP_POSSIBLE
> +	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
>  	default y
>  	---help---
>  	  Allow the system to enter sleep states in which main memory is
>  	  powered and thus its contents are preserved, such as the
>  	  suspend-to-RAM state (i.e. the ACPI S3 state).
>  
> +config HIBERNATION_UP_POSSIBLE
> +	bool
> +	depends on X86 || PPC64_SWSUSP || FRV || PPC32
> +	depends on !SMP
> +	default y
> +
> +config HIBERNATION_SMP_POSSIBLE
> +	bool
> +	depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP
> +	depends on SMP
> +	default y
> +
>  config HIBERNATION
>  	bool "Hibernation (aka 'suspend to disk')"
>  	depends on PM && SWAP
> -	depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || SUSPEND_SMP_POSSIBLE
> +	depends on HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
>  	---help---
>  	  Enable the suspend to disk (STD) functionality, which is usually
>  	  called "hibernation" in user interfaces.  STD checkpoints the
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-08-04 22:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 21:59 [PATCH] PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION Rafael J. Wysocki
2007-08-03 22:01 ` Linus Torvalds
2007-08-03 22:47   ` Rafael J. Wysocki
2007-08-03 22:47   ` Rafael J. Wysocki
2007-08-04  3:45     ` Len Brown
2007-08-04  3:45       ` Len Brown
2007-08-04  9:48       ` Rafael J. Wysocki
2007-08-04  9:48       ` Rafael J. Wysocki
2007-08-04 22:09         ` Rafael J. Wysocki [this message]
2007-08-04 22:09           ` Rafael J. Wysocki
2007-08-03 22:01 ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2007-08-03 21:59 Rafael J. Wysocki

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=200708050009.10769.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@stusta.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.