linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL] sanitize power management config menus
@ 2003-07-26 20:02 Tomas Szepe
  2003-07-27  2:46 ` Randy.Dunlap
  0 siblings, 1 reply; 10+ messages in thread
From: Tomas Szepe @ 2003-07-26 20:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml

$subj

patch against -bk3.

-- 
Tomas Szepe <szepe@pinerecords.com>


diff -urN a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig	2003-07-10 23:30:33.000000000 +0200
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig	2003-07-26 21:37:13.000000000 +0200
@@ -2,10 +2,9 @@
 # CPU Frequency scaling
 #
 
-menu "CPU Frequency scaling"
-
 config CPU_FREQ
 	bool "CPU Frequency scaling"
+	depends on PM
 	help
 	  Clock scaling allows you to change the clock speed of CPUs on the
 	  fly. This is a nice method to save battery power on notebooks,
@@ -16,6 +15,8 @@
 
 	  If in doubt, say N.
 
+if CPU_FREQ
+
 source "drivers/cpufreq/Kconfig"
 
 config CPU_FREQ_TABLE
@@ -162,4 +163,4 @@
 
 	  If in doubt, say N.
 
-endmenu
+endif
diff -urN a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
--- a/drivers/acpi/Kconfig	2003-06-22 22:27:39.000000000 +0200
+++ b/drivers/acpi/Kconfig	2003-07-26 21:34:05.000000000 +0200
@@ -2,7 +2,7 @@
 # ACPI Configuration
 #
 
-menu "ACPI Support"
+if PM
 
 config ACPI
 	bool "ACPI Support" if X86
@@ -36,6 +36,8 @@
 	  available at:
 	  <http://www.acpi.info>
 
+if ACPI
+
 config ACPI_HT_ONLY
 	bool "CPU Enumeration Only"
 	depends on X86 && ACPI && X86_LOCAL_APIC
@@ -236,5 +238,6 @@
 	depends on IA64 && (!IA64_HP_SIM || IA64_SGI_SN)
 	default y
 
-endmenu
+endif
 
+endif

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-26 20:02 [TRIVIAL] sanitize power management config menus Tomas Szepe
@ 2003-07-27  2:46 ` Randy.Dunlap
  2003-07-27  2:56   ` Tomas Szepe
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Randy.Dunlap @ 2003-07-27  2:46 UTC (permalink / raw)
  To: Tomas Szepe; +Cc: torvalds, linux-kernel



On Sat, 26 Jul 2003 22:02:13 +0200 Tomas Szepe <szepe@pinerecords.com> wrote:

| patch against -bk3.
| 
| -- 

This patch is mostly OK IMHO.

1.  However, both old and new versions say:
  Power management options (ACPI, APM)  --->
but have Software Suspend and CPU Frequency (hidden) below there,
so one has to know to look there for them, while the heading
only says APCI and APM.  I guess that the heading is too restrictive.

2.  APM and ACPI aren't usable together, right?  so should the
Kconfig file prevent both of them from being enabled?

3.  The help text for Software Suspend (not part of this patch)
really needs some help.  Would you address that or shall I?

Thanks,
--
~Randy
| http://developer.osdl.org/rddunlap/ | http://www.xenotime.net/linux/ |
For Linux-2.6:
http://www.codemonkey.org.uk/post-halloween-2.5.txt
  or http://lwn.net/Articles/39901/
http://www.kernel.org/pub/linux/kernel/people/rusty/modules/

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  2:46 ` Randy.Dunlap
@ 2003-07-27  2:56   ` Tomas Szepe
  2003-07-27  3:46     ` Randy.Dunlap
  2003-07-27  3:00   ` Linus Torvalds
  2003-07-27  6:49   ` Matias Alejo Garcia
  2 siblings, 1 reply; 10+ messages in thread
From: Tomas Szepe @ 2003-07-27  2:56 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: torvalds, linux-kernel

> [rddunlap@osdl.org]
> 
> 1.  However, both old and new versions say:
>   Power management options (ACPI, APM)  --->
> but have Software Suspend and CPU Frequency (hidden) below there,
> so one has to know to look there for them, while the heading
> only says APCI and APM.  I guess that the heading is too restrictive.

Yes, you're right, let's just kill the parentheses.

> 2.  APM and ACPI aren't usable together, right?  so should the
> Kconfig file prevent both of them from being enabled?

I'm not quite sure about this, though I believe that
ACPI at least in the CPU-enum-only configuration makes
sense even with APM enabled.

> 3.  The help text for Software Suspend (not part of this patch)
> really needs some help.  Would you address that or shall I?

Sure, it would be nice if you could fish out an entry from somewhere.

-- 
Tomas Szepe <szepe@pinerecords.com>

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  2:46 ` Randy.Dunlap
  2003-07-27  2:56   ` Tomas Szepe
@ 2003-07-27  3:00   ` Linus Torvalds
  2003-07-27  6:49   ` Matias Alejo Garcia
  2 siblings, 0 replies; 10+ messages in thread
From: Linus Torvalds @ 2003-07-27  3:00 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Tomas Szepe, linux-kernel


On Sat, 26 Jul 2003, Randy.Dunlap wrote:
> 
> 2.  APM and ACPI aren't usable together, right?  so should the
> Kconfig file prevent both of them from being enabled?

They aren't used at the same time (as power management, at least), but
they should be usable together (ACPI doing things like CPU enumeration,
APM doing sleeps), and even more importantly, you should be able to 
compile both, and if ACPI is disabled or the BIOS doesn't have an ACPI 
table, the power management should just fall back to APM.

So they definitely aren't supposed to be mutually exclusive from a
configuration standpoint.

		Linus


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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  2:56   ` Tomas Szepe
@ 2003-07-27  3:46     ` Randy.Dunlap
  2003-07-27  5:02       ` Rahul Karnik
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Randy.Dunlap @ 2003-07-27  3:46 UTC (permalink / raw)
  To: Tomas Szepe; +Cc: torvalds, linux-kernel

On Sun, 27 Jul 2003 04:56:47 +0200 Tomas Szepe <szepe@pinerecords.com> wrote:

| > 3.  The help text for Software Suspend (not part of this patch)
| > really needs some help.  Would you address that or shall I?
| 
| Sure, it would be nice if you could fish out an entry from somewhere.

OK, how's this look?

--
~Randy


patch_name:	sws_help.patch
patch_version:	2003-07-26.20:32:10
author:		Randy.Dunlap <rddunlap@osdl.org>
description:	make software_suspend help readable
product:	Linux
product_versions: 2.6.0-test1
diffstat:	=
 arch/i386/Kconfig   |   30 +++++++++++++++---------------
 arch/x86_64/Kconfig |   20 ++++++++++----------
 2 files changed, 25 insertions(+), 25 deletions(-


diff -Naur ./arch/i386/Kconfig~swshelp ./arch/i386/Kconfig
--- ./arch/i386/Kconfig~swshelp	2003-07-25 10:23:11.000000000 -0700
+++ ./arch/i386/Kconfig	2003-07-26 20:30:50.000000000 -0700
@@ -824,27 +824,27 @@
 	bool "Software Suspend (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && PM && SWAP
 	---help---
-	  Enable the possibilty of suspendig machine. It doesn't need APM.
-	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
-	  (patch for sysvinit needed). 
-
-	  It creates an image which is saved in your active swaps. By the next
-	  booting the, pass 'resume=/path/to/your/swap/file' and kernel will 
-	  detect the saved image, restore the memory from
-	  it and then it continues to run as before you've suspended.
-	  If you don't want the previous state to continue use the 'noresume'
-	  kernel option. However note that your partitions will be fsck'd and
-	  you must re-mkswap your swap partitions/files.
+	  Enable the possibility of suspending the machine. It doesn't need
+	  APM. You may suspend your machine by 'swsusp' or 'shutdown -z <time>'
+	  (patch for sysvinit is needed). 
+
+	  This creates an image which is saved in your active swap space. On
+	  the next boot, pass the 'resume=/path/to/your/swap/file' option and
+	  the kernel will detect the saved image, restore the memory from it,
+	  and then continue to run as before you suspended.
+	  If you don't want the previous state to continue, use the 'noresume'
+	  kernel option. However, note that your partitions will appear to be
+	  damaged so you must re-mkswap your swap partitions/files to use them.
 
 	  Right now you may boot without resuming and then later resume but
-	  in meantime you cannot use those swap partitions/files which were
+	  in the meantime you cannot use those swap partitions/files which were
 	  involved in suspending. Also in this case there is a risk that buffers
 	  on disk won't match with saved ones.
 
-	  SMP is supported ``as-is''. There's a code for it but doesn't work.
-	  There have been problems reported relating SCSI.
+	  SMP is supported ``as-is''. There's code for it but doesn't work.
+	  There have been problems reported relating to SCSI.
 
-	  This option is about getting stable. However there is still some
+	  This option is close to getting stable. However there is still some
 	  absence of features.
 
 	  For more information take a look at Documentation/swsusp.txt.
diff -Naur ./arch/x86_64/Kconfig~swshelp ./arch/x86_64/Kconfig
--- ./arch/x86_64/Kconfig~swshelp	2003-07-13 20:37:13.000000000 -0700
+++ ./arch/x86_64/Kconfig	2003-07-26 20:31:04.000000000 -0700
@@ -300,17 +300,17 @@
 	bool "Software Suspend (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && PM && SWAP
 	---help---
-	  Enable the possibilty of suspending the machine. It doesn't need APM.
-	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
-	  (patch for sysvinit needed). 
-
-	  It creates an image which is saved in your active swaps. On the next
-	  boot, pass the 'resume=/path/to/your/swap/file' option and the kernel
-	  will detect the saved image, restore the memory from
-	  it, and then continue to run as before you suspended.
+	  Enable the possibility of suspending the machine. It doesn't need
+	  APM. You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
+	  (patch for sysvinit is needed). 
+
+	  This creates an image which is saved in your active swap space. On
+	  the next boot, pass the 'resume=/path/to/your/swap/file' option and
+	  the kernel will detect the saved image, restore the memory from it,
+	  and then continue to run as before you suspended.
 	  If you don't want the previous state to continue, use the 'noresume'
-	  kernel option. However, note that your partitions will be fsck'd and
-	  you must re-mkswap your swap partitions/files.
+	  kernel option. However, note that your partitions will appear to be
+	  damaged so you must re-mkswap your swap partitions/files to use them.
 
 	  Right now you may boot without resuming and then later resume but
 	  in the meantime you cannot use those swap partitions/files which were

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  3:46     ` Randy.Dunlap
@ 2003-07-27  5:02       ` Rahul Karnik
  2003-07-27  6:57       ` Tomas Szepe
  2003-07-27 11:13       ` Pavel Machek
  2 siblings, 0 replies; 10+ messages in thread
From: Rahul Karnik @ 2003-07-27  5:02 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Tomas Szepe, torvalds, linux-kernel

Randy.Dunlap wrote:

> +	  This creates an image which is saved in your active swap space. On
> +	  the next boot, pass the 'resume=/path/to/your/swap/file' option and
> +	  the kernel will detect the saved image, restore the memory from it,
> +	  and then continue to run as before you suspended.

Couple of points/questions:

- Is it possible to make swsusp use a dedicated hibernate partition, for 
better interoperability with Windows? I was thinking of the dual boot 
situation, where I would like a laptop to boot whatever OS was booted 
last. And how does s4bios fit in?

- Perhaps we can mention in the help text that swsusp performs a 
function similar to hibernate, and different from the APM suspend 
operation, with corresponding power savings.

Thanks,
Rahul


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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  2:46 ` Randy.Dunlap
  2003-07-27  2:56   ` Tomas Szepe
  2003-07-27  3:00   ` Linus Torvalds
@ 2003-07-27  6:49   ` Matias Alejo Garcia
  2 siblings, 0 replies; 10+ messages in thread
From: Matias Alejo Garcia @ 2003-07-27  6:49 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Kernel

On Sat, 2003-07-26 at 22:46, Randy.Dunlap wrote:
> 2.  APM and ACPI aren't usable together, right?  so should the
> Kconfig file prevent both of them from being enabled?

No. It is good to have both compiled in the kernel and to choose thru
kernel parms which to use, or to have them in modules.

matías
-- 
Matias Alejo Garcia <mat@matiu.com.ar>

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  3:46     ` Randy.Dunlap
  2003-07-27  5:02       ` Rahul Karnik
@ 2003-07-27  6:57       ` Tomas Szepe
  2003-07-27 11:13       ` Pavel Machek
  2 siblings, 0 replies; 10+ messages in thread
From: Tomas Szepe @ 2003-07-27  6:57 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: torvalds, linux-kernel

> | > 3.  The help text for Software Suspend (not part of this patch)
> | > really needs some help.  Would you address that or shall I?
> | 
> | Sure, it would be nice if you could fish out an entry from somewhere.
> 
> OK, how's this look?

Looks good to me.  IMHO it would be appropriate to put the two (identical)
swsusp entries in a single Kconfig file and reference that from the arch
Kconfigs, though (while you're at it :D).

-- 
Tomas Szepe <szepe@pinerecords.com>

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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27  3:46     ` Randy.Dunlap
  2003-07-27  5:02       ` Rahul Karnik
  2003-07-27  6:57       ` Tomas Szepe
@ 2003-07-27 11:13       ` Pavel Machek
  2003-07-27 12:07         ` Tomas Szepe
  2 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2003-07-27 11:13 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Tomas Szepe, torvalds, linux-kernel

Hi!

> | > 3.  The help text for Software Suspend (not part of this patch)
> | > really needs some help.  Would you address that or shall I?
> | 
> | Sure, it would be nice if you could fish out an entry from somewhere.
> 
> OK, how's this look?

Hey, I had similar patch in queue somewhere.

> --- ./arch/i386/Kconfig~swshelp	2003-07-25 10:23:11.000000000 -0700
> +++ ./arch/i386/Kconfig	2003-07-26 20:30:50.000000000 -0700
> @@ -824,27 +824,27 @@
>  	bool "Software Suspend (EXPERIMENTAL)"
>  	depends on EXPERIMENTAL && PM && SWAP
>  	---help---
> -	  Enable the possibilty of suspendig machine. It doesn't need APM.
> -	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
> -	  (patch for sysvinit needed). 
> -
> -	  It creates an image which is saved in your active swaps. By the next
> -	  booting the, pass 'resume=/path/to/your/swap/file' and kernel will 
> -	  detect the saved image, restore the memory from
> -	  it and then it continues to run as before you've suspended.
> -	  If you don't want the previous state to continue use the 'noresume'
> -	  kernel option. However note that your partitions will be fsck'd and
> -	  you must re-mkswap your swap partitions/files.
> +	  Enable the possibility of suspending the machine. It doesn't need
> +	  APM. You may suspend your machine by 'swsusp' or 'shutdown -z <time>'
> +	  (patch for sysvinit is needed). 
> +
> +	  This creates an image which is saved in your active swap space. On
> +	  the next boot, pass the 'resume=/path/to/your/swap/file' option and

Swap *files* are no longer supported. Swap partitions work.

> +	  the kernel will detect the saved image, restore the memory from it,
> +	  and then continue to run as before you suspended.
> +	  If you don't want the previous state to continue, use the 'noresume'
> +	  kernel option. However, note that your partitions will appear to be
> +	  damaged so you must re-mkswap your swap partitions/files to use them.
>  
>  	  Right now you may boot without resuming and then later resume but
> -	  in meantime you cannot use those swap partitions/files which were
> +	  in the meantime you cannot use those swap partitions/files which were
>  	  involved in suspending. Also in this case there is a risk that buffers
>  	  on disk won't match with saved ones.

I guess we do not want to teach people doing this.

> -	  SMP is supported __as-is''. There's a code for it but doesn't work.
> -	  There have been problems reported relating SCSI.
> +	  SMP is supported __as-is''. There's code for it but doesn't work.
> +	  There have been problems reported relating to SCSI.

SMP is not supported. Kill the note about SCSI.

> -	  This option is about getting stable. However there is still some
> +	  This option is close to getting stable. However there is still some
>  	  absence of features.

Kill this. Saying (EXPERIMENTAL) should be enough.

-- 
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...


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

* Re: [TRIVIAL] sanitize power management config menus
  2003-07-27 11:13       ` Pavel Machek
@ 2003-07-27 12:07         ` Tomas Szepe
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Szepe @ 2003-07-27 12:07 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Randy.Dunlap, torvalds, linux-kernel

> > +	  This creates an image which is saved in your active swap space. On
> > +	  the next boot, pass the 'resume=/path/to/your/swap/file' option and
> 
> Swap *files* are no longer supported. Swap partitions work.

Right.

> >  	  Right now you may boot without resuming and then later resume but
> > -	  in meantime you cannot use those swap partitions/files which were
> > +	  in the meantime you cannot use those swap partitions/files which were
> >  	  involved in suspending. Also in this case there is a risk that buffers
> >  	  on disk won't match with saved ones.
> 
> I guess we do not want to teach people doing this.

Right.

> > -	  SMP is supported __as-is''. There's a code for it but doesn't work.
> > -	  There have been problems reported relating SCSI.
> > +	  SMP is supported __as-is''. There's code for it but doesn't work.
> > +	  There have been problems reported relating to SCSI.
> 
> SMP is not supported. Kill the note about SCSI.

Ok.

> > -	  This option is about getting stable. However there is still some
> > +	  This option is close to getting stable. However there is still some
> >  	  absence of features.
> 
> Kill this. Saying (EXPERIMENTAL) should be enough.

Agreed.

I'll be sending a revised combined patch to clean up the power
management menu in a minute, will CC.

-- 
Tomas Szepe <szepe@pinerecords.com>

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

end of thread, other threads:[~2003-07-27 11:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-26 20:02 [TRIVIAL] sanitize power management config menus Tomas Szepe
2003-07-27  2:46 ` Randy.Dunlap
2003-07-27  2:56   ` Tomas Szepe
2003-07-27  3:46     ` Randy.Dunlap
2003-07-27  5:02       ` Rahul Karnik
2003-07-27  6:57       ` Tomas Szepe
2003-07-27 11:13       ` Pavel Machek
2003-07-27 12:07         ` Tomas Szepe
2003-07-27  3:00   ` Linus Torvalds
2003-07-27  6:49   ` Matias Alejo Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).