diff options
author | venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com> | 2009-07-02 20:08:30 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-07-06 21:38:27 -0400 |
commit | 7d26e2d5e2da37e92c6c7644b26b294dedd8c982 (patch) | |
tree | 44d1637ac603fad42cbbf28ba7a89c9e194c4d0f /drivers/cpufreq/cpufreq.c | |
parent | faf80d62e44dc627efb741f48db50c1858d1667c (diff) |
[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>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6e2ec0b18948..c7fe16e0474b 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) | |||
1070 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 1070 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
1071 | #endif | 1071 | #endif |
1072 | 1072 | ||
1073 | unlock_policy_rwsem_write(cpu); | ||
1074 | |||
1075 | if (cpufreq_driver->target) | 1073 | if (cpufreq_driver->target) |
1076 | __cpufreq_governor(data, CPUFREQ_GOV_STOP); | 1074 | __cpufreq_governor(data, CPUFREQ_GOV_STOP); |
1077 | 1075 | ||
@@ -1088,6 +1086,8 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev) | |||
1088 | if (cpufreq_driver->exit) | 1086 | if (cpufreq_driver->exit) |
1089 | cpufreq_driver->exit(data); | 1087 | cpufreq_driver->exit(data); |
1090 | 1088 | ||
1089 | unlock_policy_rwsem_write(cpu); | ||
1090 | |||
1091 | free_cpumask_var(data->related_cpus); | 1091 | free_cpumask_var(data->related_cpus); |
1092 | free_cpumask_var(data->cpus); | 1092 | free_cpumask_var(data->cpus); |
1093 | kfree(data); | 1093 | kfree(data); |