cpuquiet: Fix race in runnable governor
authorPeter Boonstoppel <pboonstoppel@nvidia.com>
Wed, 5 Dec 2012 18:45:53 +0000 (10:45 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 08:07:09 +0000 (16:07 +0800)
commite2f9ff4d86b03608f47fd40bbf15b856d5e77f57
tree99fca23ca9f8014a3c5bc9a2a6e0278725d910f2
parent4643c04d29ecc46a2d98aa49541163f160a56ef1
cpuquiet: Fix race in runnable governor

Fixed a race where the cpuquiet driver would call device_free() before
the governor was started, which would lead to a kernel panic because
runnables_timer was not initialized.

Introduced RUNNING state, so states are:
- DISABLED: truly disabled
- IDLE: enabled, but not polling upon request from the driver
- RUNNING: actively polling

Bug 1189042

Change-Id: I45b9ce40e61e1cfddde74ff7b2691722204045bb
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: http://git-master/r/168803
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Tested-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
drivers/cpuquiet/governors/runnable_threads.c