Re: [PATCH 03/14] powerpc/64s: idle provide a default idle for POWER9
From: Gautham R Shenoy <hidden>
Date: 2017-06-12 08:53:24
Hi Nick, On Mon, Jun 12, 2017 at 09:58:24AM +1000, Nicholas Piggin wrote:
quoted hunk ↗ jump to hunk
Before the cpuidle driver is enabled, provide a default idle function similarly to POWER7/8. This should not have much effect, because the cpuidle driver for powernv is mandatory, but if that changes we should have a fallback. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/platforms/powernv/idle.c | 2 ++ 1 file changed, 2 insertions(+)diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index f188d84d9c59..e327e1585ddc 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c@@ -677,6 +677,8 @@ static int __init pnv_init_idle_states(void) if (supported_cpuidle_states & OPAL_PM_NAP_ENABLED) ppc_md.power_save = power7_idle; + else if (supported_cpuidle_states & OPAL_PM_STOP_INST_FAST) + ppc_md.power_save = power9_idle;
We are already initializing this in pnv_power9_idle_init() depending on whether the device tree has exposed at least one INST_FAST idle state. Else this should be NULL, because the firmware doesn't want us to use a platform idle state!
out: return 0; -- 2.11.0