Re: [PATCH v6 07/11] powerpc/powernv: set power_save func after the idle states are initialized
From: Michael Neuling <hidden>
Date: 2016-06-22 05:11:38
Also in:
lkml
On Wed, 2016-06-22 at 11:54 +1000, Benjamin Herrenschmidt wrote:
On Wed, 2016-06-08 at 11:54 -0500, Shreyas B. Prabhu wrote:quoted
=20 pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done =20 Reviewed-by: Gautham R. Shenoy <redacted> Signed-off-by: Shreyas B. Prabhu <redacted>Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> =20 Please merge that one as-is now, no need to wait for the rest, as otherwise pwoer9 crashes at boot. It doesn't need to wait for the rest of the series.
Acked-by: Michael Neuling <redacted> For the same reason. Without this we need powersave=3Doff on the cmdline on POWER9. Mikey
=20 Cheers, Ben. =20quoted
=20 --- - No changes since v1 =20 =C2=A0arch/powerpc/platforms/powernv/idle.c=C2=A0=C2=A0| 3 +++ =C2=A0arch/powerpc/platforms/powernv/setup.c | 2 +- =C2=A02 files changed, 4 insertions(+), 1 deletion(-) =20diff --git a/arch/powerpc/platforms/powernv/idle.cb/arch/powerpc/platforms/powernv/idle.c index fcc8b68..fbb09fb 100644--- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c@@ -285,6 +285,9 @@ static int __init pnv_init_idle_states(void)=C2=A0 } =C2=A0 =C2=A0 pnv_alloc_idle_core_states(); + + if (supported_cpuidle_states & OPAL_PM_NAP_ENABLED) + ppc_md.power_save =3D power7_idle; =C2=A0out_free: =C2=A0 kfree(flags); =C2=A0out:diff --git a/arch/powerpc/platforms/powernv/setup.cb/arch/powerpc/platforms/powernv/setup.c index ee6430b..8492bbb 100644--- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c@@ -315,7 +315,7 @@ define_machine(powernv) {=C2=A0 .get_proc_freq=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=3D pnv_get_proc_freq,
quoted
=C2=A0 .progress =3D pnv_progress, =C2=A0 .machine_shutdown =3D pnv_shutdown, - .power_save=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=3D power7_idle,
quoted
+ .power_save=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=3D NULL,
quoted
=C2=A0 .calibrate_decr =3D generic_calibrate_decr, =C2=A0#ifdef CONFIG_KEXEC =C2=A0 .kexec_cpu_down =3D pnv_kexec_cpu_down,