Re: [RFC PATCH V1 5/7] cpuidle: (POWER) cpuidle driver for pSeries

2011-06-21 Thread Trinabh Gupta
On 06/17/2011 10:06 AM, Benjamin Herrenschmidt wrote: On Tue, 2011-06-07 at 22:00 +0530, Trinabh Gupta wrote: +static int snooze_loop(struct cpuidle_device *dev, + struct cpuidle_driver *drv, + int index) +{ + unsigned long in_purr, out_purr

Re: [RFC PATCH V1 4/7] cpuidle: (powerpc) Add cpu_idle_wait() to allow switching idle routines

2011-06-20 Thread Trinabh Gupta
On 06/17/2011 10:02 AM, Benjamin Herrenschmidt wrote: On Tue, 2011-06-07 at 22:00 +0530, Trinabh Gupta wrote: diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 39a2baa..932392b 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -102,6 +102,24

Re: [RFC PATCH V1 1/7] cpuidle: create bootparam "cpuidle.off=1"

2011-06-20 Thread Trinabh Gupta
On 06/17/2011 09:59 AM, Benjamin Herrenschmidt wrote: On Tue, 2011-06-07 at 21:59 +0530, Trinabh Gupta wrote: From: Len Brown useful for disabling cpuidle to fall back to architecture-default idle loop cpuidle drivers and governors will fail to register. on x86 they'll say so: intel

[RFC PATCH V1 7/7] cpuidle: (POWER) Handle power_save=off

2011-06-07 Thread Trinabh Gupta
This patch makes pseries_idle_driver to be not registered when power_save=off kernel boot option is specified. For this boot_option_idle_override is used similar to how it is used for x86. Signed-off-by: Trinabh Gupta Signed-off-by: Arun R Bharadwaj --- arch/powerpc/include/asm/processor.h

[RFC PATCH V1 6/7] cpuidle: (POWER) Enable cpuidle and directly call cpuidle_idle_call() for pSeries

2011-06-07 Thread Trinabh Gupta
are now implemented as part of pseries_idle cpuidle driver. Signed-off-by: Trinabh Gupta Signed-off-by: Arun R Bharadwaj --- arch/powerpc/platforms/Kconfig |6 ++ arch/powerpc/platforms/pseries/Kconfig |2 - arch/powerpc/platforms/pseries/setup.c | 86

[RFC PATCH V1 5/7] cpuidle: (POWER) cpuidle driver for pSeries

2011-06-07 Thread Trinabh Gupta
This patch implements a cpuidle driver for pSeries based on routines pseries_dedicated_idle_loop and pseries_shared_idle_loop. The driver is built only if CONFIG_CPU_IDLE is set. This cpuidle driver uses global registration of idle states and not per-cpu. Signed-off-by: Trinabh Gupta Signed-off

[RFC PATCH V1 4/7] cpuidle: (powerpc) Add cpu_idle_wait() to allow switching idle routines

2011-06-07 Thread Trinabh Gupta
This patch provides cpu_idle_wait() routine required by the cpuidle subsystem. Almost all the code is borrowed from x86. Signed-off-by: Trinabh Gupta Signed-off-by: Arun R Bharadwaj --- arch/powerpc/Kconfig |4 arch/powerpc/include/asm/system.h |1 + arch/powerpc

[RFC PATCH V1 3/7] cpuidle: stop using pm_idle

2011-06-07 Thread Trinabh Gupta
From: Len Brown pm_idle does not scale as an idle handler registration mechanism. Don't use it for cpuidle. Instead, call cpuidle directly, and allow architectures to use pm_idle as an arch-specific default if they need it. ie. cpu_idle() ... if(cpuidle_call_idle())

[RFC PATCH V1 2/7] cpuidle: replace xen access to x86 pm_idle and default_idle

2011-06-07 Thread Trinabh Gupta
From: Len Brown When a Xen Dom0 kernel boots on a hypervisor, it gets access to the raw-hardware ACPI tables. While it parses the idle tables for the hypervisor's beneift, it uses HLT for its own idle. Rather than have xen scribble on pm_idle and access default_idle, have it simply disable_cpui

[RFC PATCH V1 1/7] cpuidle: create bootparam "cpuidle.off=1"

2011-06-07 Thread Trinabh Gupta
From: Len Brown useful for disabling cpuidle to fall back to architecture-default idle loop cpuidle drivers and governors will fail to register. on x86 they'll say so: intel_idle: intel_idle yielding to (null) ACPI: acpi_idle yielding to (null) Signed-off-by: Len Brown --- Documentation/ker

[RFC PATCH V1 0/7] cpuidle: (POWER) cpuidle driver for pSeries

2011-06-07 Thread Trinabh Gupta
This patch series ports the cpuidle framework for ppc64 platform and implements a cpuidle back-end driver for ppc64 (pSeries) platform. Currently idle states are managed by pseries_{dedicated,shared}_idle_sleep() routines in arch/powerpc/platforms/pseries/setup.c. There are generally two idle sta