Re: [PATCH v3 4/5] s390/idle: Introduce cpuidle for s390
From: Heiko Carstens
Date: Fri Jun 19 2026 - 04:02:25 EST
On Thu, Jun 18, 2026 at 02:00:18PM +0200, Mete Durlu wrote:
> Introduce generic cpuidle driver on s390. Use a two stage approach to
> handle idle scenarios and use idle governor for idle stage selection.
> Two stages are, from shallow to deep, idle polling and enabled wait.
>
> Suggested-by: Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>
> Suggested-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> Signed-off-by: Mete Durlu <meted@xxxxxxxxxxxxx>
> ---
> MAINTAINERS | 8 +++
> arch/s390/Kconfig | 5 ++
> drivers/cpuidle/Kconfig | 5 ++
> drivers/cpuidle/Kconfig.s390 | 11 ++++
> drivers/cpuidle/Makefile | 4 ++
> drivers/cpuidle/cpuidle-s390.c | 115 +++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 148 insertions(+)
...
> +static void __init s390_cpuidle_ew_tune(void)
> +{
> + struct cpuidle_state *state = &s390_cpuidle_driver.states[1];
> +
> + if (machine_is_lpar()) {
> + state->target_residency = 5;
> + state->exit_latency = 5;
> + } else {
> + state->target_residency = 1;
> + state->exit_latency = 1;
> + }
> +}
My Reviewed-by from the previous version still stands. However minor thing is
that this function should be renamed to something like s390_cpuidle_ew_init()
or s390_cpuidle_ew_setup().
But that's something Alexander can do when applying. Or it stays like it
is. Not too important.
Anyway:
Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>