Skip to content

Commit 7aa1031

Browse files
committed
cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported
Although there are processors supporting hardware-managed P-states (HWP) without the energy-performance preference (EPP) feature, they are not expected to be run with HWP enabled (the BIOS should disable HWP on those systems). Missing EPP support generally indicates an incomplete HWP implementation and so it is better to avoid using HWP on those systems in production. However, intel_pstate currently enables HWP on such systems, which is questionable, so prevent it from doing that by making it check EPP support before enabling HWP and avoid enabling it if EPP is not supported by the processor at hand. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 23a522e commit 7aa1031

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,12 @@ static int __init intel_pstate_init(void)
28232823
id = x86_match_cpu(hwp_support_ids);
28242824
if (id) {
28252825
copy_cpu_funcs(&core_funcs);
2826-
if (!no_hwp) {
2826+
/*
2827+
* Avoid enabling HWP for processors without EPP support,
2828+
* because that means incomplete HWP implementation which is a
2829+
* corner case and supporting it is generally problematic.
2830+
*/
2831+
if (!no_hwp && boot_cpu_has(X86_FEATURE_HWP_EPP)) {
28272832
hwp_active++;
28282833
hwp_mode_bdw = id->driver_data;
28292834
intel_pstate.attr = hwp_cpufreq_attrs;

0 commit comments

Comments
 (0)