Skip to content

Commit ae9c78a

Browse files
yu-chen-surfgregkh
authored andcommitted
cpufreq: intel_pstate: Enable HWP during system resume on CPU0
[ Upstream commit 70f6bf2 ] When maxcpus=1 is in the kernel command line, the BP is responsible for re-enabling the HWP - because currently only the APs invoke intel_pstate_hwp_enable() during their online process - which might put the system into unstable state after resume. Fix this by enabling the HWP explicitly on BP during resume. Reported-by: Doug Smythies <[email protected]> Suggested-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Yu Chen <[email protected]> [ rjw: Subject/changelog, minor modifications ] Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c4c9fd5 commit ae9c78a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,13 +779,18 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
779779
return 0;
780780
}
781781

782+
static void intel_pstate_hwp_enable(struct cpudata *cpudata);
783+
782784
static int intel_pstate_resume(struct cpufreq_policy *policy)
783785
{
784786
if (!hwp_active)
785787
return 0;
786788

787789
mutex_lock(&intel_pstate_limits_lock);
788790

791+
if (policy->cpu == 0)
792+
intel_pstate_hwp_enable(all_cpu_data[policy->cpu]);
793+
789794
all_cpu_data[policy->cpu]->epp_policy = 0;
790795
intel_pstate_hwp_set(policy->cpu);
791796

0 commit comments

Comments
 (0)