Re: [PATCH v2] cpuidle: Add sanity check for exit latency and target residency

From: Artem Bityutskiy
Date: Sat Nov 08 2025 - 09:07:50 EST


On Sat, 2025-11-08 at 12:48 +0100, Rafael J. Wysocki wrote:
> > > +static int validate_state(struct cpuidle_state *s, struct cpuidle_state *prev_s)
> > > +{
> > > +       if (s->exit_latency == 0)
> > > +               return -EINVAL;
> >
> > The change above will break the polling state AFAICS.

Thanks for feedback. Yes. I first implemented this in intel_idle.c,
where this made sense, but then moved to cpuidle.c and did not notice.

Thanks,
Artem.