From 6cab0b20dd5524a2ffdcaf1f5d08b8ca72c2f0a4 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Tue, 2 Feb 2021 12:02:59 +0530 Subject: [PATCH] sched/walt: Update cpufreq_driver_fast_switch() invocation cpu_frequency trace events are coming twice when a frequency switch happens. This is due to commit 08d8c65e849d ("cpufreq: Move traces and update to policy->cur to cpufreq core") in the upstream which takes care of cpu_frequency trace event and updates to policy->cur when cpufreq_driver_fast_switch() is called. So remove the redundant code from waltgov cpufreq governor to avoid duplicate cpu_frequency trave events. Change-Id: I490e766abcc09ed2a580e5f09930a54d76367999 Signed-off-by: Pavankumar Kondeti --- kernel/sched/walt/cpufreq_walt.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kernel/sched/walt/cpufreq_walt.c b/kernel/sched/walt/cpufreq_walt.c index 3d24cf3fd1e7..68de7690ac66 100644 --- a/kernel/sched/walt/cpufreq_walt.c +++ b/kernel/sched/walt/cpufreq_walt.c @@ -180,22 +180,12 @@ static void waltgov_fast_switch(struct waltgov_policy *wg_policy, u64 time, unsigned int next_freq) { struct cpufreq_policy *policy = wg_policy->policy; - unsigned int cpu; if (!waltgov_update_next_freq(wg_policy, time, next_freq)) return; waltgov_track_cycles(wg_policy, wg_policy->policy->cur, time); - next_freq = cpufreq_driver_fast_switch(policy, next_freq); - if (!next_freq) - return; - - policy->cur = next_freq; - - if (trace_cpu_frequency_enabled()) { - for_each_cpu(cpu, policy->cpus) - trace_cpu_frequency(next_freq, cpu); - } + cpufreq_driver_fast_switch(policy, next_freq); } static void waltgov_deferred_update(struct waltgov_policy *wg_policy, u64 time,