cpufreq: interactive: no need warning when delta_time==0

delta_time==0 may happen by chance when irq_work and idle_end come together,
but it is ok, cpufreq_interactive will correct it next period.

[ 6559.355576] WARNING: CPU: 5 PID: 0 at drivers/cpufreq/cpufreq_interactive.c:395 eval_target_freq+0x640/0x670
[ 6559.355604] Modules linked in:
[ 6559.355618] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.19.111 #252
[ 6559.355624] Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
[ 6559.355631] pstate: 20400005 (nzCv daif +PAN -UAO)
[ 6559.355636] pc : eval_target_freq+0x640/0x670
[ 6559.355642] lr : eval_target_freq+0xc4/0x670
[ 6559.360919] Call trace:
[ 6559.360951]  eval_target_freq+0x640/0x670
[ 6559.360972]  cpufreq_interactive_update+0x1c/0xbc
[ 6559.361000]  cpufreq_interactive_idle_notifier+0x98/0xb4
[ 6559.361026]  atomic_notifier_call_chain+0x4c/0x84
[ 6559.361065]  idle_notifier_call_chain+0x1c/0x24
[ 6559.361089]  arch_cpu_idle_exit+0x10/0x18
[ 6559.361119]  do_idle+0x8c/0x288
[ 6559.361138]  cpu_startup_entry+0x20/0x24
[ 6559.361169]  secondary_start_kernel+0x138/0x144
[ 6559.361203] ---[ end trace c8c6e336a23d6818 ]---

Change-Id: I413b84b964e557935a353dab1e67cebed00c6754
Signed-off-by: Liang Chen <cl@rock-chips.com>
This commit is contained in:
Liang Chen
2020-04-12 16:45:47 +08:00
parent 70335261b7
commit 468a0911c2

View File

@@ -392,7 +392,7 @@ static void eval_target_freq(struct interactive_cpu *icpu)
cputime_speedadj = icpu->cputime_speedadj;
spin_unlock_irqrestore(&icpu->load_lock, flags);
if (WARN_ON_ONCE(!delta_time))
if (!delta_time)
return;
spin_lock_irqsave(&icpu->target_freq_lock, flags);