Re: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig

Previous thread: Serial console and the Sun X4100M2 ILOM by Sam Vilain on Wednesday, November 7, 2007 - 2:30 pm. (1 message)

Next thread: Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig by Rafael J. Wysocki on Wednesday, November 7, 2007 - 3:19 pm. (1 message)
From: Rafael J. Wysocki
Date: Wednesday, November 7, 2007 - 3:17 pm

Both patches look good.

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

Greetings,
Rafael
-

From: Johannes Berg
Date: Thursday, November 8, 2007 - 7:44 am

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

johannes
From: Andrew Morton
Date: Thursday, November 8, 2007 - 10:21 am

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

From: Johannes Berg
Date: Thursday, November 8, 2007 - 10:30 am

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 ...
From: Andrew Morton
Date: Thursday, November 8, 2007 - 11:06 am

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.

-

From: Johannes Berg
Date: Thursday, November 8, 2007 - 11:11 am

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

joahnnes
From: Johannes Berg
Date: Thursday, November 8, 2007 - 11:21 am

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
From: Johannes Berg
Date: Thursday, November 8, 2007 - 10:31 am

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 ...
Previous thread: Serial console and the Sun X4100M2 ILOM by Sam Vilain on Wednesday, November 7, 2007 - 2:30 pm. (1 message)

Next thread: Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig by Rafael J. Wysocki on Wednesday, November 7, 2007 - 3:19 pm. (1 message)