login
Header Space

 
 

Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Adrian Bunk <bunk@...>
Cc: Rafael J. Wysocki <rjw@...>, Len Brown <lenb@...>, <david@...>, Andrew Morton <akpm@...>, <linux-acpi@...>, <linux-kernel@...>, Pavel Machek <pavel@...>
Date: Friday, July 27, 2007 - 6:57 pm

On Sat, 28 Jul 2007, Adrian Bunk wrote:

Yeah, this looks reasonable.

May I suggest another level of indirection, though:


How about making this a bit more split up, and do it as

	# SMP suspend is possible on ..
	config SUSPEND_SMP_POSSIBLE
		bool
		depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
		default y

	# UP suspend is possible on ..
	config SUSPEND_UP_POSSIBLE
		bool
		depends on X86 || PPC64_SWSUSP || FRV || PPC32
		default y 

	# Can we suspend?
	config SUSPEND_POSSIBLE
		bool
		depends on (SMP && SUSPEND_SMP_POSSIBLE) || (SUSPEND_UP_POSSIBLE && !SMP)
		default y

and then we have just a

	config SOFTWARE_SUSPEND
		bool "Software Suspend (Hibernation)"
		depends on PM && SWAP
		depends on SUSPEND_POSSIBLE

	config SUSPEND_SMP
		bool
		depends on SOFTWARE_SUSPEND && SMP
		select HOTPLUG_CPU
		default y

and now each of the config options looks pretty simple and describe one 
thing.

[ For extra bonus points: the SUSPEND_POSSIBLE thing is still pretty 
  complicated, and it might actually be a better idea to make it a 
  per-arch config option, and just make the x86/arch say

	config SUSPEND_POSSIBLE
		bool
		depends on !(X86_VOYAGER && SMP)
		default y

  instead: since SUSPEND_POSSIBLE is always true on x86 regardless of SMP 
  or not, just not on X86_VOYAGER. Then, each architecture can have its 
  own private rules for whether that architecture has SUSPEND_POSSIBLE or 
  not, so on ppc, it might look like

	config SUSPEND_POSSIBLE
		bool
		depends on (PPC64 && (PPC_PSERIES || PPC_PMAC)) || PPC_SWSUSP
		bool y

  or something, but the point is, now the complexity is a per-architecture 
  thing, so other architectures simply don't have to care any more! ]

And the user only ever sees one single question: the one for 
"SOFTWARE_SUSPEND". All the others would directly flow either from the 
architecture choice, or from that.

Anybody willing to rewrite it that way?

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Wed Jul 25, 12:38 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Wed Jul 25, 2:48 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Wed Jul 25, 6:51 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Thu Jul 26, 12:26 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Thu Jul 26, 2:55 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Thu Jul 26, 1:45 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Thu Jul 26, 2:16 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Jeff Garzik, (Thu Jul 26, 2:27 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Thu Jul 26, 2:18 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Thu Jul 26, 2:01 pm)
CONFIG_SUSPEND? (was: Re: [GIT PATCH] ACPI patches for 2.6.2..., Rafael J. Wysocki, (Thu Jul 26, 3:17 pm)
Re: CONFIG_SUSPEND? (was: Re: [GIT PATCH] ACPI patches for 2..., Rafael J. Wysocki, (Thu Jul 26, 4:48 pm)
Re: CONFIG_SUSPEND? (was: Re: [GIT PATCH] ACPI patches for 2..., Rafael J. Wysocki, (Sat Jul 28, 2:29 pm)
[PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSPEND ..., Rafael J. Wysocki, (Sun Jul 29, 6:20 am)
[PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSPEND ..., Rafael J. Wysocki, (Sun Jul 29, 5:23 pm)
Re: [PATCH] ACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again), Rafael J. Wysocki, (Wed Aug 1, 6:24 am)
[PATCH] create CONFIG_SUSPEND_UP_POSSIBLE, Len Brown, (Mon Jul 30, 11:54 pm)
Re: [PATCH] create CONFIG_SUSPEND_UP_POSSIBLE, Pavel Machek, (Tue Jul 31, 2:38 am)
Re: [PATCH] create CONFIG_SUSPEND_UP_POSSIBLE, Len Brown, (Fri Aug 3, 3:23 pm)
Re: [PATCH] create CONFIG_SUSPEND_UP_POSSIBLE, Pavel Machek, (Sun Aug 5, 2:36 pm)
Re: [PATCH] create CONFIG_SUSPEND_UP_POSSIBLE, Rafael J. Wysocki, (Tue Jul 31, 5:33 am)
Re: [PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSP..., Rafael J. Wysocki, (Mon Jul 30, 3:25 am)
[PATCH 2/2] Introduce CONFIG_SUSPEND (updated), Rafael J. Wysocki, (Sun Jul 29, 5:27 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND (updated), Len Brown, (Tue Jul 31, 12:59 am)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND (updated), Rafael J. Wysocki, (Tue Jul 31, 5:15 am)
Re: [linux-pm] Re: [PATCH 2/2] Introduce CONFIG_SUSPEND (upd..., Rafael J. Wysocki, (Tue Jul 31, 6:01 am)
[PATCH 1/2] Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBE..., Rafael J. Wysocki, (Sun Jul 29, 5:24 pm)
[PATCH 2/2] Introduce CONFIG_SUSPEND, Rafael J. Wysocki, (Sun Jul 29, 8:38 am)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Adrian Bunk, (Sun Jul 29, 4:40 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Rafael J. Wysocki, (Sun Jul 29, 5:17 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Adrian Bunk, (Sun Jul 29, 5:18 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Rafael J. Wysocki, (Sun Jul 29, 5:36 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Richard Hughes, (Sun Jul 29, 5:30 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Kyle Moffett, (Sun Jul 29, 10:47 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Rafael J. Wysocki, (Sun Jul 29, 6:22 pm)
Re: [PATCH 2/2] Introduce CONFIG_SUSPEND, Pavel Machek, (Mon Jul 30, 5:26 pm)
[PATCH 1/2] Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBE..., Rafael J. Wysocki, (Sun Jul 29, 6:21 am)
[PATCH] ACPI: restore CONFIG_ACPI_SLEEP, Len Brown, (Sat Jul 28, 3:33 am)
[2.6 patch] let SUSPEND select HOTPLUG_CPU, Adrian Bunk, (Fri Jul 27, 6:25 pm)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Linus Torvalds, (Fri Jul 27, 6:57 pm)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Stefan Richter, (Fri Jul 27, 6:47 pm)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Adrian Bunk, (Fri Jul 27, 7:03 pm)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Pavel Machek, (Mon Jul 30, 5:18 pm)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Stefan Richter, (Sat Jul 28, 4:42 am)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Sergio Monteiro Basto, (Sat Jul 28, 10:44 am)
Re: [2.6 patch] let SUSPEND select HOTPLUG_CPU, Rafael J. Wysocki, (Sat Jul 28, 2:30 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Gabriel C, (Thu Jul 26, 6:07 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Len Brown, (Thu Jul 26, 2:05 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Thu Jul 26, 2:18 pm)
Re: defconfig , ACPI=n compile error, Gabriel C, (Thu Jul 26, 2:53 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Gabriel C, (Thu Jul 26, 2:38 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Linus Torvalds, (Thu Jul 26, 3:02 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Jan Dittmer, (Fri Jul 27, 2:26 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Andreas Schwab, (Fri Jul 27, 7:50 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Jan Dittmer, (Sat Jul 28, 3:58 am)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Yasha Okshtein, (Tue Jul 31, 9:34 pm)
Re: [GIT PATCH] ACPI patches for 2.6.23-rc1, Thomas Renninger, (Fri Jul 27, 12:25 pm)
speck-geostationary