public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups
@ 2007-11-07 13:57 Johannes Berg
  2007-11-07 13:57 ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-07 13:57 UTC (permalink / raw)
  To: linux-pm

These two patches, intended for 2.6.25, clean up the
suspend/hibernate Kconfig.

johannes

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
  2007-11-07 13:57 [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Johannes Berg
@ 2007-11-07 13:57 ` Johannes Berg
  2007-11-07 13:58 ` [PATCH (2.6.25) 2/2] suspend: " Johannes Berg
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-07 13:57 UTC (permalink / raw)
  To: linux-pm; +Cc: linuxppc-dev

[-- Attachment #1: 025-hibernate-kconfig-cleanup.patch --]
[-- Type: text/plain, Size: 3070 bytes --]

This cleans up the hibernation Kconfig and removes the need to
declare centrally which architectures support hibernation. All
architectures that currently support hibernation are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: linuxppc-dev@ozlabs.org
Cc: linux-pm@lists.linux-foundation.org

---
 arch/i386/Kconfig    |    4 ++++
 arch/powerpc/Kconfig |   14 ++++++++++++--
 arch/x86_64/Kconfig  |    3 +++
 kernel/power/Kconfig |   18 +++---------------
 4 files changed, 22 insertions(+), 17 deletions(-)

--- everything.orig/arch/powerpc/Kconfig	2007-11-07 13:52:14.641523382 +0100
+++ everything/arch/powerpc/Kconfig	2007-11-07 14:29:17.251530543 +0100
@@ -140,9 +140,19 @@ config DEFAULT_UIMAGE
 	  Used to allow a board to specify it wants a uImage built by default
 	default n
 
-config PPC64_SWSUSP
+config HIBERNATE_32
 	bool
-	depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
+	depends on (PPC_PMAC && !SMP) || BROKEN
+	default y
+
+config HIBERNATE_64
+	bool
+	depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL)
+	default y
+
+config ARCH_HIBERNATION_POSSIBLE
+	bool
+	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
 	default y
 
 config PPC_DCR_NATIVE
--- everything.orig/kernel/power/Kconfig	2007-11-07 13:52:14.731524087 +0100
+++ everything/kernel/power/Kconfig	2007-11-07 14:29:17.351531628 +0100
@@ -63,7 +63,8 @@ config PM_TRACE
 
 config PM_SLEEP_SMP
 	bool
-	depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
+	depends on SMP
+	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 	default y
@@ -97,22 +98,9 @@ config SUSPEND
 	  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 || 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 HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
+	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
 	---help---
 	  Enable the suspend to disk (STD) functionality, which is usually
 	  called "hibernation" in user interfaces.  STD checkpoints the
--- everything.orig/arch/i386/Kconfig	2007-11-07 13:54:07.811521157 +0100
+++ everything/arch/i386/Kconfig	2007-11-07 14:29:16.631526474 +0100
@@ -1319,3 +1319,7 @@ config X86_TRAMPOLINE
 config KTIME_SCALAR
 	bool
 	default y
+
+config ARCH_HIBERNATION_POSSIBLE
+	def_bool y
+	depends on !SMP || !X86_VOYAGER
--- everything.orig/arch/x86_64/Kconfig	2007-11-07 13:57:35.091520777 +0100
+++ everything/arch/x86_64/Kconfig	2007-11-07 14:29:16.721529458 +0100
@@ -716,6 +716,9 @@ menu "Power management options"
 
 source kernel/power/Kconfig
 
+config ARCH_HIBERNATION_POSSIBLE
+	def_bool y
+
 config ARCH_HIBERNATION_HEADER
 	bool
 	depends on HIBERNATION

-- 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
  2007-11-07 13:57 [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Johannes Berg
  2007-11-07 13:57 ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
@ 2007-11-07 13:58 ` Johannes Berg
  2007-11-07 22:17 ` [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Rafael J. Wysocki
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-07 13:58 UTC (permalink / raw)
  To: linux-pm
  Cc: Bryan Wu, David Howells, linux-mips, Ralf Baechle, linuxppc-dev,
	Scott Wood, Guennadi Liakhovetski, Russell King

[-- Attachment #1: 026-suspend-kconfig-cleanup.patch --]
[-- Type: text/plain, Size: 5478 bytes --]

This cleans up the suspend Kconfig and removes the need to
declare centrally which architectures support suspend. All
architectures that currently support suspend are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: linuxppc-dev@ozlabs.org
Cc: linux-pm@lists.linux-foundation.org
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Russell King <rmk@arm.linux.org.uk>
---
Architecture maintainers should evaluate whether their
ARCH_SUSPEND_POSSIBLE symbol should be set only under
stricter circumstances like I've done for powerpc.

Always setting it is not usually a problem, however, since the
infrastructure is only available for use after suspend_set_ops().

 arch/arm/Kconfig      |    3 +++
 arch/blackfin/Kconfig |    4 ++++
 arch/frv/Kconfig      |    5 +++++
 arch/i386/Kconfig     |    4 ++++
 arch/mips/Kconfig     |    4 ++++
 arch/powerpc/Kconfig  |    4 ++++
 arch/sh/Kconfig       |    4 ++++
 arch/x86_64/Kconfig   |    3 +++
 kernel/power/Kconfig  |   21 +++------------------
 9 files changed, 34 insertions(+), 18 deletions(-)

--- everything.orig/arch/i386/Kconfig	2007-11-07 14:45:28.591544215 +0100
+++ everything/arch/i386/Kconfig	2007-11-07 14:45:28.631515461 +0100
@@ -1323,3 +1323,7 @@ config KTIME_SCALAR
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
 	depends on !SMP || !X86_VOYAGER
+
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !X86_VOYAGER
--- everything.orig/arch/x86_64/Kconfig	2007-11-07 14:45:28.591544215 +0100
+++ everything/arch/x86_64/Kconfig	2007-11-07 14:45:28.631515461 +0100
@@ -716,6 +716,9 @@ menu "Power management options"
 
 source kernel/power/Kconfig
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
 
--- everything.orig/kernel/power/Kconfig	2007-11-07 14:45:28.591544215 +0100
+++ everything/kernel/power/Kconfig	2007-11-07 14:45:28.641531465 +0100
@@ -64,7 +64,7 @@ config PM_TRACE
 config PM_SLEEP_SMP
 	bool
 	depends on SMP
-	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
+	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 	default y
@@ -74,29 +74,14 @@ config PM_SLEEP
 	depends on SUSPEND || HIBERNATION
 	default y
 
-config SUSPEND_UP_POSSIBLE
-	bool
-	depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
-		   || SUPERH || FRV
-	depends on !SMP
-	default y
-
-config SUSPEND_SMP_POSSIBLE
-	bool
-	depends on (X86 && !X86_VOYAGER) \
-		   || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
-	depends on SMP
-	default y
-
 config SUSPEND
 	bool "Suspend to RAM and standby"
-	depends on PM
-	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
+	depends on PM && ARCH_SUSPEND_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).
+	  suspend-to-RAM state (e.g. the ACPI S3 state).
 
 config HIBERNATION
 	bool "Hibernation (aka 'suspend to disk')"
--- everything.orig/arch/blackfin/Kconfig	2007-11-07 14:44:55.551521971 +0100
+++ everything/arch/blackfin/Kconfig	2007-11-07 14:45:28.641531465 +0100
@@ -993,6 +993,10 @@ endmenu
 menu "Power management options"
 source "kernel/power/Kconfig"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 choice
 	prompt "Select PM Wakeup Event Source"
 	default PM_WAKEUP_GPIO_BY_SIC_IWR
--- everything.orig/arch/arm/Kconfig	2007-11-07 14:44:55.651522948 +0100
+++ everything/arch/arm/Kconfig	2007-11-07 14:45:28.641531465 +0100
@@ -977,6 +977,9 @@ menu "Power management options"
 
 source "kernel/power/Kconfig"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+
 endmenu
 
 source "net/Kconfig"
--- everything.orig/arch/mips/Kconfig	2007-11-07 14:44:55.701522460 +0100
+++ everything/arch/mips/Kconfig	2007-11-07 14:45:28.641531465 +0100
@@ -1999,6 +1999,10 @@ endmenu
 
 menu "Power management options"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source "kernel/power/Kconfig"
 
 endmenu
--- everything.orig/arch/sh/Kconfig	2007-11-07 14:44:55.801520344 +0100
+++ everything/arch/sh/Kconfig	2007-11-07 14:45:28.651528536 +0100
@@ -748,6 +748,10 @@ endmenu
 menu "Power management options (EXPERIMENTAL)"
 depends on EXPERIMENTAL && SYS_SUPPORTS_PM
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source kernel/power/Kconfig
 
 endmenu
--- everything.orig/arch/frv/Kconfig	2007-11-07 14:44:55.861520941 +0100
+++ everything/arch/frv/Kconfig	2007-11-07 14:45:28.651528536 +0100
@@ -357,6 +357,11 @@ source "drivers/pcmcia/Kconfig"
 #	  should probably wait a while.
 
 menu "Power management options"
+
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source kernel/power/Kconfig
 endmenu
 
--- everything.orig/arch/powerpc/Kconfig	2007-11-07 14:45:28.591544215 +0100
+++ everything/arch/powerpc/Kconfig	2007-11-07 14:45:28.651528536 +0100
@@ -155,6 +155,10 @@ config ARCH_HIBERNATION_POSSIBLE
 	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
 	default y
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200
+
 config PPC_DCR_NATIVE
 	bool
 	default n

-- 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
       [not found] ` <20071107135849.207149000@sipsolutions.net>
@ 2007-11-07 15:13   ` Paul Mundt
  2007-11-07 22:19   ` Rafael J. Wysocki
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Paul Mundt @ 2007-11-07 15:13 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, David Howells, linux-mips, Ralf Baechle, linuxppc-dev,
	Scott Wood, linux-pm, Guennadi Liakhovetski, Russell King

On Wed, Nov 07, 2007 at 02:58:00PM +0100, Johannes Berg wrote:
> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: linuxppc-dev@ozlabs.org
> Cc: linux-pm@lists.linux-foundation.org
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Bryan Wu <bryan.wu@analog.com>
> Cc: Russell King <rmk@arm.linux.org.uk>
> ---
> Architecture maintainers should evaluate whether their
> ARCH_SUSPEND_POSSIBLE symbol should be set only under
> stricter circumstances like I've done for powerpc.
> 
The SH bits look fine.

Acked-by: Paul Mundt <lethal@linux-sh.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups
  2007-11-07 13:57 [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Johannes Berg
  2007-11-07 13:57 ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
  2007-11-07 13:58 ` [PATCH (2.6.25) 2/2] suspend: " Johannes Berg
@ 2007-11-07 22:17 ` Rafael J. Wysocki
  2007-11-08 14:44   ` Johannes Berg
       [not found]   ` <1194533053.6294.42.camel@johannes.berg>
       [not found] ` <20071107135848.417344000@sipsolutions.net>
       [not found] ` <20071107135849.207149000@sipsolutions.net>
  4 siblings, 2 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2007-11-07 22:17 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-pm, Andrew Morton, LKML

On Wednesday, 7 of November 2007, Johannes Berg wrote:
> These two patches, intended for 2.6.25, clean up the
> suspend/hibernate Kconfig.

Both patches look good.

Since they touch a couple of architectures, I think it's better to merge them
through -mm.

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
       [not found] ` <20071107135848.417344000@sipsolutions.net>
@ 2007-11-07 22:18   ` Rafael J. Wysocki
  2007-11-08  2:29   ` Paul Mackerras
  1 sibling, 0 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2007-11-07 22:18 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev, linux-pm, Andrew Morton, LKML

On Wednesday, 7 of November 2007, Johannes Berg wrote:
> This cleans up the hibernation Kconfig and removes the need to
> declare centrally which architectures support hibernation. All
> architectures that currently support hibernation are modified
> accordingly.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> Cc: linuxppc-dev@ozlabs.org
> Cc: linux-pm@lists.linux-foundation.org
> 
> ---
>  arch/i386/Kconfig    |    4 ++++
>  arch/powerpc/Kconfig |   14 ++++++++++++--
>  arch/x86_64/Kconfig  |    3 +++
>  kernel/power/Kconfig |   18 +++---------------
>  4 files changed, 22 insertions(+), 17 deletions(-)
> 
> --- everything.orig/arch/powerpc/Kconfig	2007-11-07 13:52:14.641523382 +0100
> +++ everything/arch/powerpc/Kconfig	2007-11-07 14:29:17.251530543 +0100
> @@ -140,9 +140,19 @@ config DEFAULT_UIMAGE
>  	  Used to allow a board to specify it wants a uImage built by default
>  	default n
>  
> -config PPC64_SWSUSP
> +config HIBERNATE_32
>  	bool
> -	depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
> +	depends on (PPC_PMAC && !SMP) || BROKEN
> +	default y
> +
> +config HIBERNATE_64
> +	bool
> +	depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL)
> +	default y
> +
> +config ARCH_HIBERNATION_POSSIBLE
> +	bool
> +	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
>  	default y
>  
>  config PPC_DCR_NATIVE
> --- everything.orig/kernel/power/Kconfig	2007-11-07 13:52:14.731524087 +0100
> +++ everything/kernel/power/Kconfig	2007-11-07 14:29:17.351531628 +0100
> @@ -63,7 +63,8 @@ config PM_TRACE
>  
>  config PM_SLEEP_SMP
>  	bool
> -	depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
> +	depends on SMP
> +	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
>  	depends on PM_SLEEP
>  	select HOTPLUG_CPU
>  	default y
> @@ -97,22 +98,9 @@ config SUSPEND
>  	  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 || 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 HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
> +	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
>  	---help---
>  	  Enable the suspend to disk (STD) functionality, which is usually
>  	  called "hibernation" in user interfaces.  STD checkpoints the
> --- everything.orig/arch/i386/Kconfig	2007-11-07 13:54:07.811521157 +0100
> +++ everything/arch/i386/Kconfig	2007-11-07 14:29:16.631526474 +0100
> @@ -1319,3 +1319,7 @@ config X86_TRAMPOLINE
>  config KTIME_SCALAR
>  	bool
>  	default y
> +
> +config ARCH_HIBERNATION_POSSIBLE
> +	def_bool y
> +	depends on !SMP || !X86_VOYAGER
> --- everything.orig/arch/x86_64/Kconfig	2007-11-07 13:57:35.091520777 +0100
> +++ everything/arch/x86_64/Kconfig	2007-11-07 14:29:16.721529458 +0100
> @@ -716,6 +716,9 @@ menu "Power management options"
>  
>  source kernel/power/Kconfig
>  
> +config ARCH_HIBERNATION_POSSIBLE
> +	def_bool y
> +
>  config ARCH_HIBERNATION_HEADER
>  	bool
>  	depends on HIBERNATION
> 



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
       [not found] ` <20071107135849.207149000@sipsolutions.net>
  2007-11-07 15:13   ` [PATCH (2.6.25) 2/2] suspend: " Paul Mundt
@ 2007-11-07 22:19   ` Rafael J. Wysocki
  2007-11-07 22:21   ` Russell King
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2007-11-07 22:19 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, linux-mips, Andrew Morton, LKML, Ralf Baechle,
	David Howells, linuxppc-dev, Scott Wood, linux-pm,
	Guennadi Liakhovetski, Russell King

On Wednesday, 7 of November 2007, Johannes Berg wrote:
> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> Cc: linuxppc-dev@ozlabs.org
> Cc: linux-pm@lists.linux-foundation.org
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Bryan Wu <bryan.wu@analog.com>
> Cc: Russell King <rmk@arm.linux.org.uk>
> ---
> Architecture maintainers should evaluate whether their
> ARCH_SUSPEND_POSSIBLE symbol should be set only under
> stricter circumstances like I've done for powerpc.
> 
> Always setting it is not usually a problem, however, since the
> infrastructure is only available for use after suspend_set_ops().
> 
>  arch/arm/Kconfig      |    3 +++
>  arch/blackfin/Kconfig |    4 ++++
>  arch/frv/Kconfig      |    5 +++++
>  arch/i386/Kconfig     |    4 ++++
>  arch/mips/Kconfig     |    4 ++++
>  arch/powerpc/Kconfig  |    4 ++++
>  arch/sh/Kconfig       |    4 ++++
>  arch/x86_64/Kconfig   |    3 +++
>  kernel/power/Kconfig  |   21 +++------------------
>  9 files changed, 34 insertions(+), 18 deletions(-)
> 
> --- everything.orig/arch/i386/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/i386/Kconfig	2007-11-07 14:45:28.631515461 +0100
> @@ -1323,3 +1323,7 @@ config KTIME_SCALAR
>  config ARCH_HIBERNATION_POSSIBLE
>  	def_bool y
>  	depends on !SMP || !X86_VOYAGER
> +
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !X86_VOYAGER
> --- everything.orig/arch/x86_64/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/x86_64/Kconfig	2007-11-07 14:45:28.631515461 +0100
> @@ -716,6 +716,9 @@ menu "Power management options"
>  
>  source kernel/power/Kconfig
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +
>  config ARCH_HIBERNATION_POSSIBLE
>  	def_bool y
>  
> --- everything.orig/kernel/power/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/kernel/power/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -64,7 +64,7 @@ config PM_TRACE
>  config PM_SLEEP_SMP
>  	bool
>  	depends on SMP
> -	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
> +	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
>  	depends on PM_SLEEP
>  	select HOTPLUG_CPU
>  	default y
> @@ -74,29 +74,14 @@ config PM_SLEEP
>  	depends on SUSPEND || HIBERNATION
>  	default y
>  
> -config SUSPEND_UP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
> -		   || SUPERH || FRV
> -	depends on !SMP
> -	default y
> -
> -config SUSPEND_SMP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) \
> -		   || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
> -	depends on SMP
> -	default y
> -
>  config SUSPEND
>  	bool "Suspend to RAM and standby"
> -	depends on PM
> -	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
> +	depends on PM && ARCH_SUSPEND_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).
> +	  suspend-to-RAM state (e.g. the ACPI S3 state).
>  
>  config HIBERNATION
>  	bool "Hibernation (aka 'suspend to disk')"
> --- everything.orig/arch/blackfin/Kconfig	2007-11-07 14:44:55.551521971 +0100
> +++ everything/arch/blackfin/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -993,6 +993,10 @@ endmenu
>  menu "Power management options"
>  source "kernel/power/Kconfig"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  choice
>  	prompt "Select PM Wakeup Event Source"
>  	default PM_WAKEUP_GPIO_BY_SIC_IWR
> --- everything.orig/arch/arm/Kconfig	2007-11-07 14:44:55.651522948 +0100
> +++ everything/arch/arm/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -977,6 +977,9 @@ menu "Power management options"
>  
>  source "kernel/power/Kconfig"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +
>  endmenu
>  
>  source "net/Kconfig"
> --- everything.orig/arch/mips/Kconfig	2007-11-07 14:44:55.701522460 +0100
> +++ everything/arch/mips/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -1999,6 +1999,10 @@ endmenu
>  
>  menu "Power management options"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source "kernel/power/Kconfig"
>  
>  endmenu
> --- everything.orig/arch/sh/Kconfig	2007-11-07 14:44:55.801520344 +0100
> +++ everything/arch/sh/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -748,6 +748,10 @@ endmenu
>  menu "Power management options (EXPERIMENTAL)"
>  depends on EXPERIMENTAL && SYS_SUPPORTS_PM
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source kernel/power/Kconfig
>  
>  endmenu
> --- everything.orig/arch/frv/Kconfig	2007-11-07 14:44:55.861520941 +0100
> +++ everything/arch/frv/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -357,6 +357,11 @@ source "drivers/pcmcia/Kconfig"
>  #	  should probably wait a while.
>  
>  menu "Power management options"
> +
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source kernel/power/Kconfig
>  endmenu
>  
> --- everything.orig/arch/powerpc/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/powerpc/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -155,6 +155,10 @@ config ARCH_HIBERNATION_POSSIBLE
>  	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
>  	default y
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200
> +
>  config PPC_DCR_NATIVE
>  	bool
>  	default n
> 



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
       [not found] ` <20071107135849.207149000@sipsolutions.net>
  2007-11-07 15:13   ` [PATCH (2.6.25) 2/2] suspend: " Paul Mundt
  2007-11-07 22:19   ` Rafael J. Wysocki
@ 2007-11-07 22:21   ` Russell King
  2007-11-08  2:30   ` Paul Mackerras
  2007-11-08  9:48   ` Ralf Baechle
  4 siblings, 0 replies; 18+ messages in thread
From: Russell King @ 2007-11-07 22:21 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, David Howells, linux-mips, Ralf Baechle, linuxppc-dev,
	Scott Wood, linux-pm, Guennadi Liakhovetski

On Wed, Nov 07, 2007 at 02:58:00PM +0100, Johannes Berg wrote:
> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: linuxppc-dev@ozlabs.org
> Cc: linux-pm@lists.linux-foundation.org
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Bryan Wu <bryan.wu@analog.com>

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

> ---
> Architecture maintainers should evaluate whether their
> ARCH_SUSPEND_POSSIBLE symbol should be set only under
> stricter circumstances like I've done for powerpc.
> 
> Always setting it is not usually a problem, however, since the
> infrastructure is only available for use after suspend_set_ops().
> 
>  arch/arm/Kconfig      |    3 +++
>  arch/blackfin/Kconfig |    4 ++++
>  arch/frv/Kconfig      |    5 +++++
>  arch/i386/Kconfig     |    4 ++++
>  arch/mips/Kconfig     |    4 ++++
>  arch/powerpc/Kconfig  |    4 ++++
>  arch/sh/Kconfig       |    4 ++++
>  arch/x86_64/Kconfig   |    3 +++
>  kernel/power/Kconfig  |   21 +++------------------
>  9 files changed, 34 insertions(+), 18 deletions(-)
> 
> --- everything.orig/arch/i386/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/i386/Kconfig	2007-11-07 14:45:28.631515461 +0100
> @@ -1323,3 +1323,7 @@ config KTIME_SCALAR
>  config ARCH_HIBERNATION_POSSIBLE
>  	def_bool y
>  	depends on !SMP || !X86_VOYAGER
> +
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !X86_VOYAGER
> --- everything.orig/arch/x86_64/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/x86_64/Kconfig	2007-11-07 14:45:28.631515461 +0100
> @@ -716,6 +716,9 @@ menu "Power management options"
>  
>  source kernel/power/Kconfig
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +
>  config ARCH_HIBERNATION_POSSIBLE
>  	def_bool y
>  
> --- everything.orig/kernel/power/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/kernel/power/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -64,7 +64,7 @@ config PM_TRACE
>  config PM_SLEEP_SMP
>  	bool
>  	depends on SMP
> -	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
> +	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
>  	depends on PM_SLEEP
>  	select HOTPLUG_CPU
>  	default y
> @@ -74,29 +74,14 @@ config PM_SLEEP
>  	depends on SUSPEND || HIBERNATION
>  	default y
>  
> -config SUSPEND_UP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
> -		   || SUPERH || FRV
> -	depends on !SMP
> -	default y
> -
> -config SUSPEND_SMP_POSSIBLE
> -	bool
> -	depends on (X86 && !X86_VOYAGER) \
> -		   || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
> -	depends on SMP
> -	default y
> -
>  config SUSPEND
>  	bool "Suspend to RAM and standby"
> -	depends on PM
> -	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
> +	depends on PM && ARCH_SUSPEND_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).
> +	  suspend-to-RAM state (e.g. the ACPI S3 state).
>  
>  config HIBERNATION
>  	bool "Hibernation (aka 'suspend to disk')"
> --- everything.orig/arch/blackfin/Kconfig	2007-11-07 14:44:55.551521971 +0100
> +++ everything/arch/blackfin/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -993,6 +993,10 @@ endmenu
>  menu "Power management options"
>  source "kernel/power/Kconfig"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  choice
>  	prompt "Select PM Wakeup Event Source"
>  	default PM_WAKEUP_GPIO_BY_SIC_IWR
> --- everything.orig/arch/arm/Kconfig	2007-11-07 14:44:55.651522948 +0100
> +++ everything/arch/arm/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -977,6 +977,9 @@ menu "Power management options"
>  
>  source "kernel/power/Kconfig"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +
>  endmenu
>  
>  source "net/Kconfig"
> --- everything.orig/arch/mips/Kconfig	2007-11-07 14:44:55.701522460 +0100
> +++ everything/arch/mips/Kconfig	2007-11-07 14:45:28.641531465 +0100
> @@ -1999,6 +1999,10 @@ endmenu
>  
>  menu "Power management options"
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source "kernel/power/Kconfig"
>  
>  endmenu
> --- everything.orig/arch/sh/Kconfig	2007-11-07 14:44:55.801520344 +0100
> +++ everything/arch/sh/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -748,6 +748,10 @@ endmenu
>  menu "Power management options (EXPERIMENTAL)"
>  depends on EXPERIMENTAL && SYS_SUPPORTS_PM
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source kernel/power/Kconfig
>  
>  endmenu
> --- everything.orig/arch/frv/Kconfig	2007-11-07 14:44:55.861520941 +0100
> +++ everything/arch/frv/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -357,6 +357,11 @@ source "drivers/pcmcia/Kconfig"
>  #	  should probably wait a while.
>  
>  menu "Power management options"
> +
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on !SMP
> +
>  source kernel/power/Kconfig
>  endmenu
>  
> --- everything.orig/arch/powerpc/Kconfig	2007-11-07 14:45:28.591544215 +0100
> +++ everything/arch/powerpc/Kconfig	2007-11-07 14:45:28.651528536 +0100
> @@ -155,6 +155,10 @@ config ARCH_HIBERNATION_POSSIBLE
>  	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
>  	default y
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200
> +
>  config PPC_DCR_NATIVE
>  	bool
>  	default n
> 
> -- 
> 

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
       [not found] ` <20071107135848.417344000@sipsolutions.net>
  2007-11-07 22:18   ` Rafael J. Wysocki
@ 2007-11-08  2:29   ` Paul Mackerras
  1 sibling, 0 replies; 18+ messages in thread
From: Paul Mackerras @ 2007-11-08  2:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev, linux-pm

Johannes Berg writes:

> This cleans up the hibernation Kconfig and removes the need to
> declare centrally which architectures support hibernation. All
> architectures that currently support hibernation are modified
> accordingly.

Acked-by: Paul Mackerras <paulus@samba.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
       [not found] ` <20071107135849.207149000@sipsolutions.net>
                     ` (2 preceding siblings ...)
  2007-11-07 22:21   ` Russell King
@ 2007-11-08  2:30   ` Paul Mackerras
  2007-11-08  9:48   ` Ralf Baechle
  4 siblings, 0 replies; 18+ messages in thread
From: Paul Mackerras @ 2007-11-08  2:30 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, linux-mips, Ralf Baechle, linuxppc-dev, linux-pm,
	Guennadi Liakhovetski, Russell King

Johannes Berg writes:

> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.

Acked-by: Paul Mackerras <paulus@samba.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
       [not found] ` <20071107135849.207149000@sipsolutions.net>
                     ` (3 preceding siblings ...)
  2007-11-08  2:30   ` Paul Mackerras
@ 2007-11-08  9:48   ` Ralf Baechle
  4 siblings, 0 replies; 18+ messages in thread
From: Ralf Baechle @ 2007-11-08  9:48 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, David Howells, linux-mips, linuxppc-dev, Scott Wood,
	linux-pm, Guennadi Liakhovetski, Russell King

On Wed, Nov 07, 2007 at 02:58:00PM +0100, Johannes Berg wrote:

> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.

Acked-by: Ralf Baechle <ralf@linux-mips.org>

Cheers,

  Ralf

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups
  2007-11-07 22:17 ` [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Rafael J. Wysocki
@ 2007-11-08 14:44   ` Johannes Berg
       [not found]   ` <1194533053.6294.42.camel@johannes.berg>
  1 sibling, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-08 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, Andrew Morton, LKML


[-- Attachment #1.1: Type: text/plain, Size: 184 bytes --]


> Since they touch a couple of architectures, I think it's better to merge them
> through -mm.

Ok. Andrew, do you want them now or wait until .24 settles down more?

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups
       [not found]   ` <1194533053.6294.42.camel@johannes.berg>
@ 2007-11-08 17:21     ` Andrew Morton
  2007-11-08 17:30       ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
                         ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Andrew Morton @ 2007-11-08 17:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-pm, linux-kernel

> On Thu, 08 Nov 2007 15:44:13 +0100 Johannes Berg <johannes@sipsolutions.net> wrote:
> 
> > Since they touch a couple of architectures, I think it's better to merge them
> > through -mm.
> 
> Ok. Andrew, do you want them now or wait until .24 settles down more?
> 

I don't know what you're referring to but whatever - send it over.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
  2007-11-08 17:21     ` Andrew Morton
@ 2007-11-08 17:30       ` Johannes Berg
  2007-11-08 17:31       ` [PATCH (2.6.25) 2/2] suspend: " Johannes Berg
       [not found]       ` <1194543003.4793.19.camel@johannes.berg>
  2 siblings, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-08 17:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm, linux-kernel

This cleans up the hibernation Kconfig and removes the need to
declare centrally which architectures support hibernation. All
architectures that currently support hibernation are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: linuxppc-dev@ozlabs.org
Cc: linux-pm@lists.linux-foundation.org
---
 arch/i386/Kconfig    |    4 ++++
 arch/powerpc/Kconfig |   14 ++++++++++++--
 arch/x86_64/Kconfig  |    3 +++
 kernel/power/Kconfig |   18 +++---------------
 4 files changed, 22 insertions(+), 17 deletions(-)

--- everything.orig/arch/powerpc/Kconfig	2007-11-08 16:47:42.231537111 +0100
+++ everything/arch/powerpc/Kconfig	2007-11-08 17:17:04.151557021 +0100
@@ -140,9 +140,19 @@ config DEFAULT_UIMAGE
 	  Used to allow a board to specify it wants a uImage built by default
 	default n
 
-config PPC64_SWSUSP
+config HIBERNATE_32
 	bool
-	depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
+	depends on (PPC_PMAC && !SMP) || BROKEN
+	default y
+
+config HIBERNATE_64
+	bool
+	depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL)
+	default y
+
+config ARCH_HIBERNATION_POSSIBLE
+	bool
+	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
 	default y
 
 config PPC_DCR_NATIVE
--- everything.orig/kernel/power/Kconfig	2007-11-08 16:47:42.411527399 +0100
+++ everything/kernel/power/Kconfig	2007-11-08 17:17:04.151557021 +0100
@@ -63,7 +63,8 @@ config PM_TRACE
 
 config PM_SLEEP_SMP
 	bool
-	depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
+	depends on SMP
+	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 	default y
@@ -97,22 +98,9 @@ config SUSPEND
 	  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 || 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 HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
+	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
 	---help---
 	  Enable the suspend to disk (STD) functionality, which is usually
 	  called "hibernation" in user interfaces.  STD checkpoints the
--- everything.orig/arch/i386/Kconfig	2007-11-08 16:47:42.301538141 +0100
+++ everything/arch/i386/Kconfig	2007-11-08 17:17:04.161529298 +0100
@@ -1319,3 +1319,7 @@ config X86_TRAMPOLINE
 config KTIME_SCALAR
 	bool
 	default y
+
+config ARCH_HIBERNATION_POSSIBLE
+	def_bool y
+	depends on !SMP || !X86_VOYAGER
--- everything.orig/arch/x86_64/Kconfig	2007-11-08 16:47:42.371532987 +0100
+++ everything/arch/x86_64/Kconfig	2007-11-08 17:17:04.161529298 +0100
@@ -716,6 +716,9 @@ menu "Power management options"
 
 source kernel/power/Kconfig
 
+config ARCH_HIBERNATION_POSSIBLE
+	def_bool y
+
 config ARCH_HIBERNATION_HEADER
 	bool
 	depends on HIBERNATION

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
  2007-11-08 17:21     ` Andrew Morton
  2007-11-08 17:30       ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
@ 2007-11-08 17:31       ` Johannes Berg
       [not found]       ` <1194543003.4793.19.camel@johannes.berg>
  2 siblings, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-08 17:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm, linux-kernel

This cleans up the suspend Kconfig and removes the need to
declare centrally which architectures support suspend. All
architectures that currently support suspend are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: linux-mips@linux-mips.org
Cc: linuxppc-dev@ozlabs.org
Cc: linux-pm@lists.linux-foundation.org
---
Acked-by fest. I hope I didn't forget anyone.

Architecture maintainers should evaluate whether their
ARCH_SUSPEND_POSSIBLE symbol should be set only under
stricter circumstances like I've done for powerpc.

Always setting it is not usually a problem, however, since the
infrastructure is only available for use after suspend_set_ops().

 arch/arm/Kconfig      |    3 +++
 arch/blackfin/Kconfig |    4 ++++
 arch/frv/Kconfig      |    5 +++++
 arch/i386/Kconfig     |    4 ++++
 arch/mips/Kconfig     |    4 ++++
 arch/powerpc/Kconfig  |    4 ++++
 arch/sh/Kconfig       |    4 ++++
 arch/x86_64/Kconfig   |    3 +++
 kernel/power/Kconfig  |   21 +++------------------
 9 files changed, 34 insertions(+), 18 deletions(-)

--- everything.orig/arch/i386/Kconfig	2007-11-08 17:17:04.161529298 +0100
+++ everything/arch/i386/Kconfig	2007-11-08 17:17:05.021529460 +0100
@@ -1323,3 +1323,7 @@ config KTIME_SCALAR
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
 	depends on !SMP || !X86_VOYAGER
+
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !X86_VOYAGER
--- everything.orig/arch/x86_64/Kconfig	2007-11-08 17:17:04.161529298 +0100
+++ everything/arch/x86_64/Kconfig	2007-11-08 17:17:05.021529460 +0100
@@ -716,6 +716,9 @@ menu "Power management options"
 
 source kernel/power/Kconfig
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
 
--- everything.orig/kernel/power/Kconfig	2007-11-08 17:17:04.151557021 +0100
+++ everything/kernel/power/Kconfig	2007-11-08 17:17:05.031557021 +0100
@@ -64,7 +64,7 @@ config PM_TRACE
 config PM_SLEEP_SMP
 	bool
 	depends on SMP
-	depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
+	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 	default y
@@ -74,29 +74,14 @@ config PM_SLEEP
 	depends on SUSPEND || HIBERNATION
 	default y
 
-config SUSPEND_UP_POSSIBLE
-	bool
-	depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
-		   || SUPERH || FRV
-	depends on !SMP
-	default y
-
-config SUSPEND_SMP_POSSIBLE
-	bool
-	depends on (X86 && !X86_VOYAGER) \
-		   || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
-	depends on SMP
-	default y
-
 config SUSPEND
 	bool "Suspend to RAM and standby"
-	depends on PM
-	depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
+	depends on PM && ARCH_SUSPEND_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).
+	  suspend-to-RAM state (e.g. the ACPI S3 state).
 
 config HIBERNATION
 	bool "Hibernation (aka 'suspend to disk')"
--- everything.orig/arch/blackfin/Kconfig	2007-11-08 16:47:41.381538792 +0100
+++ everything/arch/blackfin/Kconfig	2007-11-08 17:17:05.031557021 +0100
@@ -993,6 +993,10 @@ endmenu
 menu "Power management options"
 source "kernel/power/Kconfig"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 choice
 	prompt "Select PM Wakeup Event Source"
 	default PM_WAKEUP_GPIO_BY_SIC_IWR
--- everything.orig/arch/arm/Kconfig	2007-11-08 16:47:41.471536784 +0100
+++ everything/arch/arm/Kconfig	2007-11-08 17:17:05.031557021 +0100
@@ -977,6 +977,9 @@ menu "Power management options"
 
 source "kernel/power/Kconfig"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+
 endmenu
 
 source "net/Kconfig"
--- everything.orig/arch/mips/Kconfig	2007-11-08 16:47:41.581534723 +0100
+++ everything/arch/mips/Kconfig	2007-11-08 17:17:05.041533041 +0100
@@ -1999,6 +1999,10 @@ endmenu
 
 menu "Power management options"
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source "kernel/power/Kconfig"
 
 endmenu
--- everything.orig/arch/sh/Kconfig	2007-11-08 16:47:41.641537653 +0100
+++ everything/arch/sh/Kconfig	2007-11-08 17:17:05.041533041 +0100
@@ -748,6 +748,10 @@ endmenu
 menu "Power management options (EXPERIMENTAL)"
 depends on EXPERIMENTAL && SYS_SUPPORTS_PM
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source kernel/power/Kconfig
 
 endmenu
--- everything.orig/arch/frv/Kconfig	2007-11-08 16:47:41.751533475 +0100
+++ everything/arch/frv/Kconfig	2007-11-08 17:17:05.041533041 +0100
@@ -357,6 +357,11 @@ source "drivers/pcmcia/Kconfig"
 #	  should probably wait a while.
 
 menu "Power management options"
+
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on !SMP
+
 source kernel/power/Kconfig
 endmenu
 
--- everything.orig/arch/powerpc/Kconfig	2007-11-08 17:17:04.151557021 +0100
+++ everything/arch/powerpc/Kconfig	2007-11-08 17:17:05.041533041 +0100
@@ -155,6 +155,10 @@ config ARCH_HIBERNATION_POSSIBLE
 	depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
 	default y
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200
+
 config PPC_DCR_NATIVE
 	bool
 	default n

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
       [not found]       ` <1194543003.4793.19.camel@johannes.berg>
@ 2007-11-08 18:06         ` Andrew Morton
       [not found]         ` <20071108100618.40e6c0af.akpm@linux-foundation.org>
  1 sibling, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2007-11-08 18:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-pm, linux-kernel

> On Thu, 08 Nov 2007 18:30:03 +0100 Johannes Berg <johannes@sipsolutions.net> wrote:
> This cleans up the hibernation Kconfig and removes the need to
> declare centrally which architectures support hibernation. All
> architectures that currently support hibernation are modified
> accordingly.
> 
> ...
>
>  arch/powerpc/Kconfig |   14 ++++++++++++--
>  arch/x86_64/Kconfig  |    3 +++
>  kernel/power/Kconfig |   18 +++---------------

I assume this was against 2.6.23.  Please, it's not very useful to prepare
patches against such an old kernel.  Even if the receiver were to fix te
patch up, there isn't much confidence that it will actually work at
compile-time and runtime.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
       [not found]         ` <20071108100618.40e6c0af.akpm@linux-foundation.org>
@ 2007-11-08 18:11           ` Johannes Berg
  2007-11-08 18:21             ` Johannes Berg
  0 siblings, 1 reply; 18+ messages in thread
From: Johannes Berg @ 2007-11-08 18:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 625 bytes --]


> I assume this was against 2.6.23.  Please, it's not very useful to prepare
> patches against such an old kernel.  Even if the receiver were to fix te
> patch up, there isn't much confidence that it will actually work at
> compile-time and runtime.

No, it wasn't, I diffed it against -rc1. I tested the Kconfig changes
with "make ARCH=x86_64 menuconfig" and "make ARCH=i386 menuconfig". As
far as I understand, the new x86 arch depends on being called as
ARCH=i386 or ARCH=x86_64. I may have misunderstood how the x86
architecture works but hoped Rafael would know more and tell me if I was
wrong.

joahnnes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig
  2007-11-08 18:11           ` Johannes Berg
@ 2007-11-08 18:21             ` Johannes Berg
  0 siblings, 0 replies; 18+ messages in thread
From: Johannes Berg @ 2007-11-08 18:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]


> No, it wasn't, I diffed it against -rc1. I tested the Kconfig changes
> with "make ARCH=x86_64 menuconfig" and "make ARCH=i386 menuconfig". As
> far as I understand, the new x86 arch depends on being called as
> ARCH=i386 or ARCH=x86_64. I may have misunderstood how the x86
> architecture works but hoped Rafael would know more and tell me if I was
> wrong.

ok, so Christoph Hellwig and others tell me "it's being worked on".
Please ignore these patches, I'll send new ones once that architecture
has worked out how it wants to work.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-11-08 18:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 13:57 [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Johannes Berg
2007-11-07 13:57 ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
2007-11-07 13:58 ` [PATCH (2.6.25) 2/2] suspend: " Johannes Berg
2007-11-07 22:17 ` [PATCH (2.6.25) 0/2] suspend/hibernate Kconfig cleanups Rafael J. Wysocki
2007-11-08 14:44   ` Johannes Berg
     [not found]   ` <1194533053.6294.42.camel@johannes.berg>
2007-11-08 17:21     ` Andrew Morton
2007-11-08 17:30       ` [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig Johannes Berg
2007-11-08 17:31       ` [PATCH (2.6.25) 2/2] suspend: " Johannes Berg
     [not found]       ` <1194543003.4793.19.camel@johannes.berg>
2007-11-08 18:06         ` [PATCH (2.6.25) 1/2] hibernation: " Andrew Morton
     [not found]         ` <20071108100618.40e6c0af.akpm@linux-foundation.org>
2007-11-08 18:11           ` Johannes Berg
2007-11-08 18:21             ` Johannes Berg
     [not found] ` <20071107135848.417344000@sipsolutions.net>
2007-11-07 22:18   ` Rafael J. Wysocki
2007-11-08  2:29   ` Paul Mackerras
     [not found] ` <20071107135849.207149000@sipsolutions.net>
2007-11-07 15:13   ` [PATCH (2.6.25) 2/2] suspend: " Paul Mundt
2007-11-07 22:19   ` Rafael J. Wysocki
2007-11-07 22:21   ` Russell King
2007-11-08  2:30   ` Paul Mackerras
2007-11-08  9:48   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox