[PATCH] cpuidle: Default y for pseries

2012-01-10 Thread Benjamin Herrenschmidt
We just replaced the pseries platform idle loops with a cpuidle backend,
however that means that you won't get any power saving and won't return
any unused idle time to the hypervisor unless cpuidle is enabled.

Thus is should default to y when pseries is enabled. I prefer that to
a select so we can still make it modular if we want to.

Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org
---

Linus, do you want to just pick that up or should I put it into powerpc.git
and ask you to pull ? I will have 2 or 3 other fixes there later today,
but I wanted to make sure you were ok with the approach with this
specific one.

diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index 7dbc4a8..62ca70d 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -1,7 +1,8 @@
 
 config CPU_IDLE
bool CPU idle PM support
-   default ACPI
+   default y if ACPI
+   default y if PPC_PSERIES
help
  CPU idle is a generic framework for supporting software-controlled
  idle processor power management.  It includes modular cross-platform


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] cpuidle: Default y for pseries

2012-01-10 Thread Linus Torvalds
On Tue, Jan 10, 2012 at 5:05 PM, Benjamin Herrenschmidt
b...@kernel.crashing.org wrote:

 Linus, do you want to just pick that up or should I put it into powerpc.git
 and ask you to pull ? I will have 2 or 3 other fixes there later today,
 but I wanted to make sure you were ok with the approach with this
 specific one.

It doesn't seem to be all that different from the default y if ACPI
case, so I guess it works ok.

That said, I wonder if the right approach wouldn't be

   default y if SUPPORT_CPU_IDLE

or something along those lines. And then both ACPI and PPC_PSERIES
could just select that instead. Because I do hate having random
board-level knowledge in something like this. I dunno.

   Linus
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] cpuidle: Default y for pseries

2012-01-10 Thread Benjamin Herrenschmidt
On Tue, 2012-01-10 at 22:08 -0800, Linus Torvalds wrote:
 On Tue, Jan 10, 2012 at 5:05 PM, Benjamin Herrenschmidt
 b...@kernel.crashing.org wrote:
 
  Linus, do you want to just pick that up or should I put it into powerpc.git
  and ask you to pull ? I will have 2 or 3 other fixes there later today,
  but I wanted to make sure you were ok with the approach with this
  specific one.
 
 It doesn't seem to be all that different from the default y if ACPI
 case, so I guess it works ok.

It works for my case, that's tested, but ...

 That said, I wonder if the right approach wouldn't be
 
default y if SUPPORT_CPU_IDLE
 
 or something along those lines. And then both ACPI and PPC_PSERIES
 could just select that instead. Because I do hate having random
 board-level knowledge in something like this. I dunno.

I tend to agree, I wasn't too keen on touching ACPI related stuff I
suppose it shouldn't be hard :-) Btw, what about the change:

-   default ACPI
+   default y if ACPI

(To be honest I'm not sure what the first form does in details).

Oh, also, I just see that in drivers/acpi/Kconfig:

config ACPI_PROCESSOR
tristate Processor
select THERMAL
select CPU_IDLE
default y

Hrm... maybe I should just do the same in pseries and remove both the
default statements above, what do you think ?

On pSeries I'm keen to build that in rather than make it a module too
because you get no idle handling until it loads which can be
problematic. Built-in, it seems to be quite early in the link order (if
we can still trust that nowadays ...).

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev