[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125141215.GF38837@noisy.programming.kicks-ass.net>
Date: Mon, 25 Nov 2024 15:12:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
rafael.j.wysocki@...el.com, len.brown@...el.com,
artem.bityutskiy@...ux.intel.com, dave.hansen@...ux.intel.com,
tglx@...utronix.de, gautham.shenoy@....com
Subject: Re: [RFC PATCH v4 6/8] intel_idle: Provide enter_dead() handler for
SRF
On Mon, Nov 25, 2024 at 02:58:50PM +0100, Rafael J. Wysocki wrote:
> > @@ -2143,10 +2143,15 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
> > if (intel_idle_max_cstate_reached(cstate))
> > break;
> >
> > - if (!cpuidle_state_table[cstate].enter &&
> > - !cpuidle_state_table[cstate].enter_s2idle)
> > + if (!cpuidle_state_table[cstate].enter)
> > break;
> >
> > + if (!cpuidle_state_table[cstate].enter_dead)
> > + cpuidle_state_table[cstate].enter_dead = intel_idle_enter_dead;
> > +
> > + if (!cpuidle_state_table[cstate].enter_s2idle)
> > + cpuidle_state_table[cstate].enter_s2idle = intel_idle_s2idle;
> > +
> > /* If marked as unusable, skip this state. */
> > if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_UNUSABLE) {
> > pr_debug("state %s is disabled\n",
>
> You can do the same thing with :enter() I think? And it doesn't need
> to be in one go.
!enter is used as a terminator.
And it's harder to not do everything in one go; regex ftw :-)
Powered by blists - more mailing lists