Gitweb: http://git.kernel.org/linus/7d26e2d5e2da37e92c6c7644b26b294dedd8c982
Commit: 7d26e2d5e2da37e92c6c7644b26b294dedd8c982
Parent: faf80d62e44dc627efb741f48db50c1858d1667c
Author: venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>
AuthorDate: Thu Jul 2 17:08:30 2009 -0700
Committer: Dave Jones <davej@redhat.com>
CommitDate: Mon Jul 6 21:38:27 2009 -0400
[CPUFREQ] Eliminate the recent lockdep warnings in cpufreq
Commit b14893a62c73af0eca414cfed505b8c09efc613c although it was very
much needed to properly cleanup ondemand timer, opened-up a can of worms
related to locking dependencies in cpufreq.
Patch here defines the need for dbs_mutex and cleans up its usage in
ondemand governor. This also resolves the lockdep warnings reported here
http://lkml.indiana.edu/hypermail/linux/kernel/0906.1/01925.html
http://lkml.indiana.edu/hypermail/linux/kernel/0907.0/00820.html
and few others..
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
---
drivers/cpufreq/cpufreq.c | 4 ++--
drivers/cpufreq/cpufreq_conservative.c | 27 +++++++++++----------------
drivers/cpufreq/cpufreq_ondemand.c | 27 +++++++++++----------------
3 files changed, 24 insertions(+), 34 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6e2ec0b..c7fe16e 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1070,8 +1070,6 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
#endif
- unlock_policy_rwsem_write(cpu);
-
if (cpufreq_driver->target)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
@@ -1088,6 +1086,8 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
if (cpufreq_driver->exit)
cpufreq_driver->exit(data);
+ unlock_policy_rwsem_write(cpu);
+
...