Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: intel_pstate: Enable HWP during system resume on CPU0

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 <dsmythies@telus.net>
Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Yu Chen <yu.c.chen@intel.com>
[ rjw: Subject/changelog, minor modifications ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Chen Yu and committed by
Rafael J. Wysocki
70f6bf2a 0725390d

+5
+5
drivers/cpufreq/intel_pstate.c
··· 779 779 return 0; 780 780 } 781 781 782 + static void intel_pstate_hwp_enable(struct cpudata *cpudata); 783 + 782 784 static int intel_pstate_resume(struct cpufreq_policy *policy) 783 785 { 784 786 if (!hwp_active) 785 787 return 0; 786 788 787 789 mutex_lock(&intel_pstate_limits_lock); 790 + 791 + if (policy->cpu == 0) 792 + intel_pstate_hwp_enable(all_cpu_data[policy->cpu]); 788 793 789 794 all_cpu_data[policy->cpu]->epp_policy = 0; 790 795 intel_pstate_hwp_set(policy->cpu);