cpufreq: interactive: Use del_timer/add_timer_on to rearm timers
authorJunjie Wu <junjiew@codeaurora.org>
Fri, 15 Aug 2014 23:20:54 +0000 (16:20 -0700)
committerDanny Wood <danwood76@gmail.com>
Fri, 22 Mar 2019 12:28:45 +0000 (12:28 +0000)
commitbc238d51bbb2c2c7f5ea76106ac951d38884663d
tree076dc2059b78f98d98bc510b32f2ba3e607785d7
parentf340d369af106e55733b81ad0a8aa9e2f7a5030d
cpufreq: interactive: Use del_timer/add_timer_on to rearm timers

Replace mod_timer_pinned() with del_timer(), add_timer_on().
mod_timer_pinned() always adds timer onto current CPU. Interactive
governor expects each CPU's timers to be running on the same CPU.
If cpufreq_interactive_timer_resched() is called from another CPU,
the timer will be armed on the wrong CPU.

Replacing mod_timer_pinned() with del_timer() and add_timer_on()
guarantees timers are still run on the right CPU even if another
CPU reschedules the timer. This would provide more flexibility
for future changes.

Change-Id: I3a10be37632afc0ea4e0cc9c86323b9783b216b1
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
drivers/cpufreq/cpufreq_interactive.c