[Intel-gfx] [PATCHv2.99 05/11] cpufreq: intel_pstate: Reorder intel_pstate_clear_update_util_hook() and intel_pstate_set_update_util_hook().
Francisco Jerez
currojerez at riseup.net
Tue Apr 28 03:22:52 UTC 2020
Trivial.
Signed-off-by: Francisco Jerez <currojerez at riseup.net>
---
drivers/cpufreq/intel_pstate.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 66ab6523c3eb..49401cfe9858 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2000,6 +2000,18 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
return 0;
}
+static void intel_pstate_clear_update_util_hook(unsigned int cpu)
+{
+ struct cpudata *cpu_data = all_cpu_data[cpu];
+
+ if (!cpu_data->update_util_set)
+ return;
+
+ cpufreq_remove_update_util_hook(cpu);
+ cpu_data->update_util_set = false;
+ synchronize_rcu();
+}
+
static void intel_pstate_set_update_util_hook(unsigned int cpu_num)
{
struct cpudata *cpu = all_cpu_data[cpu_num];
@@ -2019,18 +2031,6 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num)
cpu->update_util_set = true;
}
-static void intel_pstate_clear_update_util_hook(unsigned int cpu)
-{
- struct cpudata *cpu_data = all_cpu_data[cpu];
-
- if (!cpu_data->update_util_set)
- return;
-
- cpufreq_remove_update_util_hook(cpu);
- cpu_data->update_util_set = false;
- synchronize_rcu();
-}
-
static int intel_pstate_get_max_freq(struct cpudata *cpu)
{
return global.turbo_disabled || global.no_turbo ?
--
2.22.1
More information about the Intel-gfx
mailing list