lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1194543003.4793.19.camel@johannes.berg>
Date:	Thu, 08 Nov 2007 18:30:03 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	rjw@...k.pl, linux-pm@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH (2.6.25) 1/2] hibernation: clean up Kconfig

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@...solutions.net>
Acked-by: Paul Mackerras <paulus@...ba.org>
Acked-by: Rafael J. Wysocki <rjw@...k.pl>
Cc: linuxppc-dev@...abs.org
Cc: linux-pm@...ts.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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ