]> xenbits.xensource.com Git - people/iwj/xen.git/commit
cpufreq: only stop ondemand governor if already started
authorChristopher Clark <christopher.clark6@baesystems.com>
Thu, 10 Aug 2017 10:35:50 +0000 (12:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Aug 2017 10:35:50 +0000 (12:35 +0200)
commite7ec6f5f32cd2d0f723083cde3d7761c4e675f2c
tree1370436c83b0d2cace7641fb3a4ab9aad12e46fc
parentde834631b6f678cfdd7b0ec6259b1a679ea78814
cpufreq: only stop ondemand governor if already started

On CPUFREQ_GOV_STOP in cpufreq_governor_dbs, shortcut to
return success if the governor is already stopped.

Avoid executing dbs_timer_exit, to prevent tripping an assertion
within a call to kill_timer on a timer that has not been prepared
with init_timer, if the CPUFREQ_GOV_START case has not
run beforehand.

kill_timer validates timer state:
 * itself, via BUG_ON(this_cpu(timers).running == timer);
 * within active_timer, ASSERTing timer->status is within bounds;
 * within list_del, which ASSERTs timer inactive list membership.

Patch is synonymous to an OpenXT patch produced at Citrix prior to
June 2014.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/cpufreq/cpufreq_ondemand.c