All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Len Brown <len.brown@intel.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-embedded@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 2/5] PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME)
Date: Tue, 8 Feb 2011 22:21:07 +0100	[thread overview]
Message-ID: <201102082221.07930.rjw@sisk.pl> (raw)
In-Reply-To: <201102082218.28015.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

>From the users' point of view CONFIG_PM is really only used for
making it possible to set CONFIG_SUSPEND, CONFIG_HIBERNATION,
CONFIG_PM_RUNTIME and (surprisingly enough) CONFIG_XEN_SAVE_RESTORE
(CONFIG_PM_OPP also depends on CONFIG_PM, but quite artificially).
However, both CONFIG_SUSPEND and CONFIG_HIBERNATION require platform
support (independent of CONFIG_PM) and it is not quite obvious that
CONFIG_PM has to be set for CONFIG_XEN_SAVE_RESTORE to be available.
Thus, from the users' point of view, it would be more logical to
automatically select CONFIG_PM if any of the above options depending
on it are set.

Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME),
which will cause it to be selected when any of CONFIG_SUSPEND,
CONFIG_HIBERNATION, CONFIG_PM_RUNTIME, CONFIG_XEN_SAVE_RESTORE is
set and will clarify its meaning.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 arch/x86/xen/Kconfig |    2 +-
 kernel/power/Kconfig |   29 ++++++-----------------------
 2 files changed, 7 insertions(+), 24 deletions(-)

Index: linux-2.6/kernel/power/Kconfig
===================================================================
--- linux-2.6.orig/kernel/power/Kconfig
+++ linux-2.6/kernel/power/Kconfig
@@ -1,23 +1,7 @@
 config PM
-	bool "Power Management support"
-	depends on !IA64_HP_SIM
-	---help---
-	  "Power Management" means that parts of your computer are shut
-	  off or put into a power conserving "sleep" mode if they are not
-	  being used.  There are two competing standards for doing this: APM
-	  and ACPI.  If you want to use either one, say Y here and then also
-	  to the requisite support below.
-
-	  Power Management is most important for battery powered laptop
-	  computers; if you have a laptop, check out the Linux Laptop home
-	  page on the WWW at <http://www.linux-on-laptops.com/> or
-	  Tuxmobil - Linux on Mobile Computers at <http://www.tuxmobil.org/>
-	  and the Battery Powered Linux mini-HOWTO, available from
-	  <http://www.tldp.org/docs.html#howto>.
-
-	  Note that, even if you say N here, Linux on the x86 architecture
-	  will issue the hlt instruction if nothing is to be done, thereby
-	  sending the processor to sleep and saving power.
+	bool
+	depends on PM_SLEEP || PM_RUNTIME
+	default y
 
 config PM_DEBUG
 	bool "Power Management Debug Support"
@@ -102,7 +86,7 @@ config PM_SLEEP_ADVANCED_DEBUG
 
 config SUSPEND
 	bool "Suspend to RAM and standby"
-	depends on PM && ARCH_SUSPEND_POSSIBLE
+	depends on ARCH_SUSPEND_POSSIBLE
 	default y
 	---help---
 	  Allow the system to enter sleep states in which main memory is
@@ -133,7 +117,7 @@ config SUSPEND_FREEZER
 
 config HIBERNATION
 	bool "Hibernation (aka 'suspend to disk')"
-	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
+	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
 	select LZO_COMPRESS
 	select LZO_DECOMPRESS
 	---help---
@@ -224,7 +208,7 @@ config APM_EMULATION
 
 config PM_RUNTIME
 	bool "Run-time PM core functionality"
-	depends on PM
+	depends on !IA64_HP_SIM
 	---help---
 	  Enable functionality allowing I/O devices to be put into energy-saving
 	  (low power) states at run time (or autosuspended) after a specified
@@ -246,7 +230,6 @@ config ARCH_HAS_OPP
 
 config PM_OPP
 	bool "Operating Performance Point (OPP) Layer library"
-	depends on PM
 	depends on ARCH_HAS_OPP
 	---help---
 	  SOCs have a standard set of tuples consisting of frequency and
Index: linux-2.6/arch/x86/xen/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/xen/Kconfig
+++ linux-2.6/arch/x86/xen/Kconfig
@@ -38,7 +38,7 @@ config XEN_MAX_DOMAIN_MEMORY
 
 config XEN_SAVE_RESTORE
        bool
-       depends on XEN && PM
+       depends on XEN
        default y
 
 config XEN_DEBUG_FS


WARNING: multiple messages have this Message-ID (diff)
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Len Brown <len.brown@intel.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-embedded@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 2/5] PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME)
Date: Tue, 8 Feb 2011 22:21:07 +0100	[thread overview]
Message-ID: <201102082221.07930.rjw@sisk.pl> (raw)
In-Reply-To: <201102082218.28015.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

From the users' point of view CONFIG_PM is really only used for
making it possible to set CONFIG_SUSPEND, CONFIG_HIBERNATION,
CONFIG_PM_RUNTIME and (surprisingly enough) CONFIG_XEN_SAVE_RESTORE
(CONFIG_PM_OPP also depends on CONFIG_PM, but quite artificially).
However, both CONFIG_SUSPEND and CONFIG_HIBERNATION require platform
support (independent of CONFIG_PM) and it is not quite obvious that
CONFIG_PM has to be set for CONFIG_XEN_SAVE_RESTORE to be available.
Thus, from the users' point of view, it would be more logical to
automatically select CONFIG_PM if any of the above options depending
on it are set.

Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME),
which will cause it to be selected when any of CONFIG_SUSPEND,
CONFIG_HIBERNATION, CONFIG_PM_RUNTIME, CONFIG_XEN_SAVE_RESTORE is
set and will clarify its meaning.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 arch/x86/xen/Kconfig |    2 +-
 kernel/power/Kconfig |   29 ++++++-----------------------
 2 files changed, 7 insertions(+), 24 deletions(-)

Index: linux-2.6/kernel/power/Kconfig
===================================================================
--- linux-2.6.orig/kernel/power/Kconfig
+++ linux-2.6/kernel/power/Kconfig
@@ -1,23 +1,7 @@
 config PM
-	bool "Power Management support"
-	depends on !IA64_HP_SIM
-	---help---
-	  "Power Management" means that parts of your computer are shut
-	  off or put into a power conserving "sleep" mode if they are not
-	  being used.  There are two competing standards for doing this: APM
-	  and ACPI.  If you want to use either one, say Y here and then also
-	  to the requisite support below.
-
-	  Power Management is most important for battery powered laptop
-	  computers; if you have a laptop, check out the Linux Laptop home
-	  page on the WWW at <http://www.linux-on-laptops.com/> or
-	  Tuxmobil - Linux on Mobile Computers at <http://www.tuxmobil.org/>
-	  and the Battery Powered Linux mini-HOWTO, available from
-	  <http://www.tldp.org/docs.html#howto>.
-
-	  Note that, even if you say N here, Linux on the x86 architecture
-	  will issue the hlt instruction if nothing is to be done, thereby
-	  sending the processor to sleep and saving power.
+	bool
+	depends on PM_SLEEP || PM_RUNTIME
+	default y
 
 config PM_DEBUG
 	bool "Power Management Debug Support"
@@ -102,7 +86,7 @@ config PM_SLEEP_ADVANCED_DEBUG
 
 config SUSPEND
 	bool "Suspend to RAM and standby"
-	depends on PM && ARCH_SUSPEND_POSSIBLE
+	depends on ARCH_SUSPEND_POSSIBLE
 	default y
 	---help---
 	  Allow the system to enter sleep states in which main memory is
@@ -133,7 +117,7 @@ config SUSPEND_FREEZER
 
 config HIBERNATION
 	bool "Hibernation (aka 'suspend to disk')"
-	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
+	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
 	select LZO_COMPRESS
 	select LZO_DECOMPRESS
 	---help---
@@ -224,7 +208,7 @@ config APM_EMULATION
 
 config PM_RUNTIME
 	bool "Run-time PM core functionality"
-	depends on PM
+	depends on !IA64_HP_SIM
 	---help---
 	  Enable functionality allowing I/O devices to be put into energy-saving
 	  (low power) states at run time (or autosuspended) after a specified
@@ -246,7 +230,6 @@ config ARCH_HAS_OPP
 
 config PM_OPP
 	bool "Operating Performance Point (OPP) Layer library"
-	depends on PM
 	depends on ARCH_HAS_OPP
 	---help---
 	  SOCs have a standard set of tuples consisting of frequency and
Index: linux-2.6/arch/x86/xen/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/xen/Kconfig
+++ linux-2.6/arch/x86/xen/Kconfig
@@ -38,7 +38,7 @@ config XEN_MAX_DOMAIN_MEMORY
 
 config XEN_SAVE_RESTORE
        bool
-       depends on XEN && PM
+       depends on XEN
        default y
 
 config XEN_DEBUG_FS

  parent reply	other threads:[~2011-02-08 21:24 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 12:22 [PATCH] PM: Hide CONFIG_PM from users Mark Brown
2011-02-07 12:40 ` Geert Uytterhoeven
2011-02-07 13:26   ` Mark Brown
2011-02-07 13:26   ` Mark Brown
2011-02-07 12:40 ` Geert Uytterhoeven
2011-02-07 12:48 ` Ingo Molnar
2011-02-07 12:48 ` Ingo Molnar
2011-02-07 13:09   ` Mark Brown
2011-02-07 13:09   ` Mark Brown
2011-02-07 14:13 ` Stephen Rothwell
2011-02-07 14:13   ` Stephen Rothwell
2011-02-07 14:13   ` Stephen Rothwell
2011-02-07 14:18   ` Mark Brown
2011-02-07 14:18     ` Mark Brown
2011-02-07 14:44     ` Stephen Rothwell
2011-02-07 14:44     ` Stephen Rothwell
2011-02-07 14:44       ` Stephen Rothwell
2011-02-07 14:50       ` Mark Brown
2011-02-07 14:50       ` Mark Brown
2011-02-07 14:50         ` Mark Brown
2011-02-07 15:00         ` Geert Uytterhoeven
2011-02-07 15:00         ` Geert Uytterhoeven
2011-02-07 15:00           ` Geert Uytterhoeven
2011-02-07 15:00           ` Geert Uytterhoeven
2011-02-07 15:10           ` Stephen Rothwell
2011-02-07 15:10           ` Stephen Rothwell
2011-02-07 15:10             ` Stephen Rothwell
2011-02-07 15:19             ` Stephen Rothwell
2011-02-07 15:19             ` Stephen Rothwell
2011-02-07 15:19               ` Stephen Rothwell
2011-02-07 15:21               ` Mark Brown
2011-02-07 15:21               ` Mark Brown
2011-02-07 15:21                 ` Mark Brown
2011-02-07 15:36                 ` Alan Stern
2011-02-07 15:36                 ` Alan Stern
2011-02-07 15:36                   ` Alan Stern
2011-02-07 15:36                   ` Alan Stern
2011-02-07 15:49                   ` Mark Brown
2011-02-07 15:49                   ` Mark Brown
2011-02-07 15:49                     ` Mark Brown
2011-02-07 19:16                     ` Rafael J. Wysocki
2011-02-07 19:16                     ` Rafael J. Wysocki
2011-02-07 19:16                       ` Rafael J. Wysocki
2011-02-08  1:17                     ` Ray Lee
2011-02-08  1:17                     ` Ray Lee
2011-02-08  1:17                       ` Ray Lee
2011-02-08 11:18                       ` Mark Brown
2011-02-08 11:18                         ` Mark Brown
2011-02-08 11:18                       ` Mark Brown
2011-02-07 14:18   ` Mark Brown
2011-02-07 14:13 ` Stephen Rothwell
2011-02-07 19:14 ` Rafael J. Wysocki
2011-02-07 19:30   ` Mark Brown
2011-02-07 19:30   ` Mark Brown
2011-02-07 19:46     ` Rafael J. Wysocki
2011-02-07 19:46     ` Rafael J. Wysocki
2011-02-07 20:18       ` Mark Brown
2011-02-07 20:18       ` Mark Brown
2011-02-07 21:15         ` Rafael J. Wysocki
2011-02-07 21:15         ` Rafael J. Wysocki
2011-02-07 21:47           ` Dmitry Torokhov
2011-02-07 22:00             ` Rafael J. Wysocki
2011-02-07 22:23               ` Dmitry Torokhov
2011-02-07 22:23               ` Dmitry Torokhov
2011-02-07 23:05                 ` Rafael J. Wysocki
2011-02-07 23:05                   ` Rafael J. Wysocki
2011-02-08  0:50                   ` Dmitry Torokhov
2011-02-08  0:50                   ` Dmitry Torokhov
2011-02-08  9:23                     ` Rafael J. Wysocki
2011-02-08  9:23                     ` Rafael J. Wysocki
2011-02-08 16:48                   ` Paul Mundt
2011-02-08 16:48                   ` Paul Mundt
2011-02-07 22:00             ` Rafael J. Wysocki
2011-02-07 21:47           ` Dmitry Torokhov
2011-02-08 12:12           ` Mark Brown
2011-02-08 12:12           ` Mark Brown
2011-02-08 12:21           ` [PATCH] Remove CONFIG_PM altogether, enable power management all the time Ingo Molnar
2011-02-08 12:21           ` Ingo Molnar
2011-02-08 21:18             ` [PATCH 0/5] " Rafael J. Wysocki
2011-02-08 21:18             ` Rafael J. Wysocki
2011-02-08 21:20               ` [PATCH 1/5] ACPI / PM: Move references to pm_flags into sleep.c Rafael J. Wysocki
2011-02-08 23:40                 ` Linus Torvalds
2011-02-08 23:40                 ` Linus Torvalds
2011-02-09  0:37                   ` Rafael J. Wysocki
2011-02-09  0:37                   ` Rafael J. Wysocki
2011-02-09  1:04                     ` Linus Torvalds
2011-02-09  1:04                     ` Linus Torvalds
2011-02-08 21:20               ` Rafael J. Wysocki
2011-02-08 21:21               ` [PATCH 2/5] PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME) Rafael J. Wysocki
2011-02-08 21:21               ` Rafael J. Wysocki [this message]
2011-02-08 21:21                 ` Rafael J. Wysocki
2011-02-08 21:21               ` [PATCH 3/5] PM: Reorder power management Kconfig options Rafael J. Wysocki
2011-02-08 21:21               ` Rafael J. Wysocki
2011-02-08 21:22               ` [PATCH 4/5] PM: Replace CONFIG_PM_OPS with CONFIG_PM Rafael J. Wysocki
2011-02-08 21:22               ` Rafael J. Wysocki
2011-02-08 21:23               ` [PATCH 5/5] PM: Clean up Kconfig dependencies Rafael J. Wysocki
2011-02-08 21:23               ` Rafael J. Wysocki
2011-02-08 23:43                 ` Linus Torvalds
2011-02-08 23:43                 ` Linus Torvalds
2011-02-10 23:32                 ` [Updated][PATCH 5/5] PM: Clean up PM_TRACE dependencies and drop unnecessary Kconfig option Rafael J. Wysocki
2011-02-10 23:32                 ` Rafael J. Wysocki
2011-02-08 23:35             ` [PATCH] Remove CONFIG_PM altogether, enable power management all the time Frank Rowand
2011-02-08 23:35             ` Frank Rowand
2011-02-08 23:35               ` Frank Rowand
2011-02-09 11:41               ` Mark Brown
2011-02-09 11:41               ` Mark Brown
2011-02-09 11:58                 ` Mark Brown
2011-02-09 11:58                 ` Mark Brown
2011-02-09 17:07                 ` Rafael J. Wysocki
2011-02-09 17:07                 ` Rafael J. Wysocki
2011-02-09 18:31                   ` Frank Rowand
2011-02-09 18:31                   ` Frank Rowand
2011-02-09 18:40                     ` Mark Brown
2011-02-09 18:40                     ` Mark Brown
2011-02-09 19:00                       ` Frank Rowand
2011-02-09 19:25                         ` Mark Brown
2011-02-09 19:53                           ` Tim Bird
2011-02-09 19:53                           ` Tim Bird
2011-02-09 19:59                             ` Mark Brown
2011-02-09 19:59                             ` Mark Brown
2011-02-09 20:09                               ` Alan Stern
2011-02-09 20:09                               ` Alan Stern
2011-02-09 20:10                                 ` Mark Brown
2011-02-09 20:10                                 ` Mark Brown
2011-02-09 19:25                         ` Mark Brown
2011-02-09 19:00                       ` Frank Rowand
2011-02-08 23:35             ` Tim Bird
2011-02-09  2:41               ` Ingo Molnar
2011-02-09  2:41               ` Ingo Molnar
2011-02-08 23:35             ` Tim Bird
2011-02-07 19:14 ` [PATCH] PM: Hide CONFIG_PM from users Rafael J. Wysocki
2011-02-08  2:52 ` Frank Rowand
2011-02-08  2:52 ` Frank Rowand
2011-02-08  2:52   ` Frank Rowand
2011-02-08 14:15   ` Mark Brown
2011-02-08 14:15   ` Mark Brown
2011-02-08 14:29 ` Pavel Machek
2011-02-08 14:29 ` Pavel Machek

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=201102082221.07930.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    --cc=stern@rowland.harvard.edu \
    --cc=tglx@linutronix.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 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.