[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12e498226b33c6cb30e40dac6a11652f29ef48ea.camel@linux.intel.com>
Date: Tue, 18 Jun 2024 03:11:18 -0700
From: srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: rafael@...nel.org, viresh.kumar@...aro.org, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, hpa@...or.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 2/2] cpufreq: intel_pstate: Support highest performance
change interrupt
Hi Borislav,
On Tue, 2024-06-18 at 11:08 +0200, Borislav Petkov wrote:
> On Mon, Jun 17, 2024 at 08:51:21PM -0700, Srinivas Pandruvada wrote:
> > + status_mask = HWP_GUARANTEED_PERF_CHANGE_STATUS;
> > + if (boot_cpu_has(X86_FEATURE_HWP_HIGHEST_PERF_CHANGE))
>
> s/boot_cpu_has/cpu_feature_enabled/g
I will change in V2
> > + status_mask |= HWP_HIGHEST_PERF_CHANGE_STATUS;
> > +
> > rdmsrl_safe(MSR_HWP_STATUS, &value);
> > - if (!(value & 0x01))
> > + if (!(value & status_mask))
> > return;
> >
> > spin_lock_irqsave(&hwp_notify_lock, flags);
> > @@ -1668,17 +1675,25 @@ static void
> > intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata)
> > cancel_delayed_work_sync(&cpudata-
> > >hwp_notify_work);
> > }
> >
> > +#define HWP_GUARANTEED_PERF_CHANGE_REQ BIT(0)
> > +#define HWP_HIGHEST_PERF_CHANGE_REQ BIT(2)
> > +
> > static void intel_pstate_enable_hwp_interrupt(struct cpudata
> > *cpudata)
> > {
> > - /* Enable HWP notification interrupt for guaranteed
> > performance change */
> > + /* Enable HWP notification interrupt for performance change
> > */
> > if (boot_cpu_has(X86_FEATURE_HWP_NOTIFY)) {
> > + u64 interrupt_mask =
> > HWP_GUARANTEED_PERF_CHANGE_REQ;
> > +
> > spin_lock_irq(&hwp_notify_lock);
> > INIT_DELAYED_WORK(&cpudata->hwp_notify_work,
> > intel_pstate_notify_work);
> > cpumask_set_cpu(cpudata->cpu,
> > &hwp_intr_enable_mask);
> > spin_unlock_irq(&hwp_notify_lock);
> >
> > + if
> > (boot_cpu_has(X86_FEATURE_HWP_HIGHEST_PERF_CHANGE))a
>
> Ditto.
Will change in v2.
Thanks,
Srinivas
Powered by blists - more mailing lists