diff options
author | Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> | 2014-12-10 00:26:51 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-12-15 10:46:40 +1100 |
commit | 8eb8ac89a364305d05ad16be983b7890eb462cc3 (patch) | |
tree | 4661793e77c8b83bc5c805f3502a8fb5a037aa32 /arch/powerpc/include/asm/opal.h | |
parent | 8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 (diff) | |
download | op-kernel-dev-8eb8ac89a364305d05ad16be983b7890eb462cc3.zip op-kernel-dev-8eb8ac89a364305d05ad16be983b7890eb462cc3.tar.gz |
powerpc/powernv: Enable Offline CPUs to enter deep idle states
The secondary threads should enter deep idle states so as to gain maximum
powersavings when the entire core is offline. To do so the offline path
must be made aware of the available deepest idle state. Hence probe the
device tree for the possible idle states in powernv core code and
expose the deepest idle state through flags.
Since the device tree is probed by the cpuidle driver as well, move
the parameters required to discover the idle states into an appropriate
common place to both the driver and the powernv core code.
Another point is that fastsleep idle state may require workarounds in
the kernel to function properly. This workaround is introduced in the
subsequent patches. However neither the cpuidle driver or the hotplug
path need be bothered about this workaround.
They will be taken care of by the core powernv code.
Originally-by: Srivatsa S. Bhat <srivatsa@mit.edu>
Signed-off-by: Preeti U. Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Reviewed-by: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: linux-pm@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 4095749..6dedf9b 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -168,6 +168,14 @@ struct opal_sg_list { #define OPAL_IPMI_RECV 108 #define OPAL_I2C_REQUEST 109 +/* Device tree flags */ + +/* Flags set in power-mgmt nodes in device tree if + * respective idle states are supported in the platform. + */ +#define OPAL_PM_NAP_ENABLED 0x00010000 +#define OPAL_PM_SLEEP_ENABLED 0x00020000 + #ifndef __ASSEMBLY__ #include <linux/notifier.h> |