Skip to content
Permalink
Browse files
cpufreq: intel_pstate: Avoid using CPPC when ACPI CPC is not valid
If ACPI CPC is not valid, dereference cpc_desc in cppc_get_perf() causes
a NULL pointer dereference. So avoid using CPPC for that scenario.

Fixes: 46573fd ("cpufreq: intel_pstate: hybrid: Rework HWP calibration")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
  • Loading branch information
khfeng authored and intel-lab-lkp committed Nov 18, 2021
1 parent 3b8bfff commit a6f59fd494dbbef65364b58fad14c1368c728dea
Showing 1 changed file with 1 addition and 1 deletion.
@@ -3369,7 +3369,7 @@ static int __init intel_pstate_init(void)
if (!default_driver)
default_driver = &intel_pstate;

if (boot_cpu_has(X86_FEATURE_HYBRID_CPU))
if (boot_cpu_has(X86_FEATURE_HYBRID_CPU) && acpi_cpc_valid())
intel_pstate_cppc_set_cpu_scaling();

goto hwp_cpu_matched;

0 comments on commit a6f59fd

Please sign in to comment.