FAILED: patch "[PATCH] cpufreq: intel_pstate: Fix active mode offline/online EPP" failed to apply to 5.10-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ed38eb49d101e829ae0f8c0a0d3bf5cb6bcbc6b2 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 17 Nov 2021 14:57:31 +0100
Subject: [PATCH] cpufreq: intel_pstate: Fix active mode offline/online EPP
handling
After commit 4adcf2e5829f ("cpufreq: intel_pstate: Add ->offline and ->online callbacks") the EPP value set by the "performance" scaling algorithm in the active mode is not restored after an offline/online cycle which replaces it with the saved EPP value coming from user space.
Address this issue by forcing intel_pstate_hwp_set() to set a new EPP value when it runs first time after online.
drivers/cpufreq/intel_pstate.c +6 -0
@@ -1006,6 +1006,12 @@ static void intel_pstate_hwp_offline(struct cpudata *cpu)*/ value &= ~GENMASK_ULL (31 ,24 ); value |=HWP_ENERGY_PERF_PREFERENCE (cpu->epp_cached); +/* +* However, make sure that EPP will be set to "performance" when +* the CPU is brought back online again and the "performance" +* scaling algorithm is still in effect. +*/ + cpu->epp_policy =CPUFREQ_POLICY_UNKNOWN ; }/*