From: Hugo Sales <hugo@hsal.es>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: Len Brown <lenb@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
"Ashton A." <me@ashtonantila.com>,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 2/4] cpufreq: intel_pstate: Send CPUFREQ_UPDATE_CPUINFO on max_freq changes
Date: Sun, 1 Nov 2026 18:58:05 +0000 [thread overview]
Message-ID: <20261101185807.112449-3-hugo@hsal.es> (raw)
In-Reply-To: <20261101185807.112449-1-hugo@hsal.es>
intel_pstate has no ->set_boost() callback. It changes
policy->cpuinfo.max_freq in __intel_pstate_update_max_freq() when
no_turbo is written and when the HWP capabilities change, so
policy_set_boost() never sends CPUFREQ_UPDATE_CPUINFO for it
Send the event from there when the value changes, before the policy
limits are refreshed
Signed-off-by: Hugo Sales <hugo@hsal.es>
---
drivers/cpufreq/intel_pstate.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 0e6ae4cdda5de..f9e356409f199 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1429,13 +1429,19 @@ static void intel_pstate_update_policies(void)
static void __intel_pstate_update_max_freq(struct cpufreq_policy *policy,
struct cpudata *cpudata)
{
+ unsigned int max_freq;
+
guard(cpufreq_policy_write)(policy);
if (hwp_active)
intel_pstate_get_hwp_cap(cpudata);
- policy->cpuinfo.max_freq = READ_ONCE(global.no_turbo) ?
- cpudata->pstate.max_freq : cpudata->pstate.turbo_freq;
+ max_freq = READ_ONCE(global.no_turbo) ?
+ cpudata->pstate.max_freq : cpudata->pstate.turbo_freq;
+ if (policy->cpuinfo.max_freq != max_freq) {
+ policy->cpuinfo.max_freq = max_freq;
+ cpufreq_notify_cpuinfo_update(policy);
+ }
refresh_frequency_limits(policy);
}
--
2.56.0
next prev parent reply other threads:[~2026-11-01 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 18:58 [RFC PATCH 0/4] ACPI: processor: thermal: Recompute the frequency cap when boost changes Hugo Sales
2026-11-01 18:58 ` [RFC PATCH 1/4] cpufreq: Add a CPUFREQ_UPDATE_CPUINFO policy notifier event Hugo Sales
2026-11-01 18:58 ` Hugo Sales [this message]
2026-11-08 7:12 ` [RFC PATCH 2/4] cpufreq: intel_pstate: Send CPUFREQ_UPDATE_CPUINFO on max_freq changes Ximing Zhang
2026-11-01 18:58 ` [RFC PATCH 3/4] ACPI: processor: thermal: Factor out the thermal_req update Hugo Sales
2026-11-01 18:58 ` [RFC PATCH 4/4] ACPI: processor: thermal: Recompute the frequency cap when boost changes Hugo Sales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261101185807.112449-3-hugo@hsal.es \
--to=hugo@hsal.es \
--cc=corbet@lwn.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=me@ashtonantila.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=skhan@linuxfoundation.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®