Skip to content

Commit be12834

Browse files
committed
cpufreq: intel_pstate: Fix fast-switch fallback path
When sugov_update_single_perf() falls back to the "frequency" path due to the missing scale-invariance, it will call cpufreq_driver_fast_switch() via sugov_fast_switch() and the driver's ->fast_switch() callback will be invoked, so it must not be NULL. However, after commit a365ab6 ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") intel_pstate sets ->fast_switch() to NULL when it is going to use intel_cpufreq_adjust_perf(), which is a mistake, because on x86 the scale-invariance may be turned off dynamically, so modify it to retain the original ->adjust_perf() callback pointer. Fixes: a365ab6 ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Reported-by: Kenneth R. Crudup <[email protected]> Tested-by: Kenneth R. Crudup <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 5c8fe58 commit be12834

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,6 @@ static int __init intel_pstate_init(void)
30863086
intel_pstate.attr = hwp_cpufreq_attrs;
30873087
intel_cpufreq.attr = hwp_cpufreq_attrs;
30883088
intel_cpufreq.flags |= CPUFREQ_NEED_UPDATE_LIMITS;
3089-
intel_cpufreq.fast_switch = NULL;
30903089
intel_cpufreq.adjust_perf = intel_cpufreq_adjust_perf;
30913090
if (!default_driver)
30923091
default_driver = &intel_pstate;

0 commit comments

Comments
 (0)