[PATCH] cpufreq: intel_pstate: Sync policy->cur when setting min pstate during CPU offline

From: Fushuai Wang

Date: Tue Apr 28 2026 - 04:32:31 EST


From: Fushuai Wang <wangfushuai@xxxxxxxxx>

When a CPU goes offline with HWP disabled, intel_pstate_set_min_pstate()
sets the MSR_IA32_PERF_CTL to minimum frequency to prevent SMT siblings
from being restricted. However, the policy->cur value was not updated,
leaving it at the previous value.

When the CPU comes back online, governor->limits() checks if target_freq
equals policy->cur and skips the frequency adjustment if they match. Since
policy->cur still holds the previous value, the governor does not call
cpufreq_driver->target to update MSR_IA32_PERF_CTL.

Fix this by synchronizing policy->cur with the hardware state when setting
minimum pstate during CPU offline.

Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled")
Signed-off-by: Fushuai Wang <wangfushuai@xxxxxxxxx>
---
drivers/cpufreq/intel_pstate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 1292da53e5fc..0bd6388caa9d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2986,8 +2986,10 @@ static int intel_cpufreq_cpu_offline(struct cpufreq_policy *policy)
*/
if (hwp_active)
intel_pstate_hwp_offline(cpu);
- else
+ else {
intel_pstate_set_min_pstate(cpu);
+ policy->cur = cpu->pstate.min_freq;
+ }

intel_pstate_exit_perf_limits(policy);

--
2.36.1