[RFC PATCH 2/4] cpufreq: intel_pstate: Send CPUFREQ_UPDATE_CPUINFO on max_freq changes
From: Hugo Sales
Date: Sun Nov 01 2026 - 13:59:40 EST
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@xxxxxxx>
---
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