]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
drivers: cpuquiet: Fix runnable gov device_busy
authorSai Gurrappadi <sgurrappadi@nvidia.com>
Tue, 13 May 2014 21:50:09 +0000 (14:50 -0700)
committerSai Gurrappadi <sgurrappadi@nvidia.com>
Wed, 28 May 2014 22:18:36 +0000 (15:18 -0700)
On device_busy, the runnable governor stops its sample timer and cancels
any queued runnable_work. However, it is possible for the cpuquiet
platform driver to call device_busy on cpuquiet_quiesence/wake_cpu calls
which can be invoked from the queued runnable_worker thread. This will
lead to the runnable_worker thread waiting infinitely on it self
finishing in cancel_work_sync.

Fix this by removing the cancel_work_sync call as it isn't necessary
because the worker doesn't requeue it self. Stopping the timer is
sufficient.

Bug 200002511

Change-Id: Ic69061b12d4dbb96b259ed9b62a0475271bd36d0
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/408994
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kerwin Wan <kerwinw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
drivers/cpuquiet/governors/runnable_threads.c

index f670d1a1aec57b1b5a63fc678aaa26b4d4e4464c..f9d6d560cb3537d21d7acb217998d2922c8a20bc 100644 (file)
@@ -292,7 +292,6 @@ static void runnables_device_busy(void)
        mutex_lock(&runnables_lock);
        if (runnables_state == RUNNING) {
                runnables_state = IDLE;
-               cancel_work_sync(&runnables_work);
                del_timer_sync(&runnables_timer);
        }
        mutex_unlock(&runnables_lock);
@@ -314,7 +313,6 @@ static void runnables_stop(void)
 
        runnables_state = DISABLED;
        del_timer_sync(&runnables_timer);
-       cancel_work_sync(&runnables_work);
        kobject_put(runnables_kobject);
        kfree(runnables_kobject);