diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-26 15:13:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-26 15:13:33 -0400 |
commit | 733be82e7d41b9f932118f021704b5289d527231 (patch) | |
tree | b2c78fe1436001a153f9fd1883e679916f79af43 /drivers | |
parent | 564346224daaa8f7222d7a92cdbb7bafde59ae6e (diff) | |
parent | ca446d06351992e4f1a7c1e5e99870ab4ec5188f (diff) |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] powernow-k8: determine exact CPU frequency for HW Pstates
[CPUFREQ] powernow-k8 cleanup msg if BIOS does not export ACPI _PSS cpufreq data
[CPUFREQ] fix timer teardown in ondemand governor
[CPUFREQ] fix timer teardown in conservative governor
[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call
[CPUFREQ] powernow-k7 build fix when ACPI=n
[CPUFREQ] add atom family to p4-clockmod
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 5 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d270e8eb3e67..47d2ad0ae079 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1070,11 +1070,11 @@ 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 | |||
1073 | if (cpufreq_driver->target) | 1075 | if (cpufreq_driver->target) |
1074 | __cpufreq_governor(data, CPUFREQ_GOV_STOP); | 1076 | __cpufreq_governor(data, CPUFREQ_GOV_STOP); |
1075 | 1077 | ||
1076 | unlock_policy_rwsem_write(cpu); | ||
1077 | |||
1078 | kobject_put(&data->kobj); | 1078 | kobject_put(&data->kobj); |
1079 | 1079 | ||
1080 | /* we need to make sure that the underlying kobj is actually | 1080 | /* we need to make sure that the underlying kobj is actually |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 2ecd95e4ab1a..7a74d175287b 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -91,6 +91,9 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */ | |||
91 | * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then | 91 | * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then |
92 | * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock | 92 | * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock |
93 | * is recursive for the same process. -Venki | 93 | * is recursive for the same process. -Venki |
94 | * DEADLOCK ALERT! (2) : do_dbs_timer() must not take the dbs_mutex, because it | ||
95 | * would deadlock with cancel_delayed_work_sync(), which is needed for proper | ||
96 | * raceless workqueue teardown. | ||
94 | */ | 97 | */ |
95 | static DEFINE_MUTEX(dbs_mutex); | 98 | static DEFINE_MUTEX(dbs_mutex); |
96 | 99 | ||
@@ -542,7 +545,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) | |||
542 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) | 545 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) |
543 | { | 546 | { |
544 | dbs_info->enable = 0; | 547 | dbs_info->enable = 0; |
545 | cancel_delayed_work(&dbs_info->work); | 548 | cancel_delayed_work_sync(&dbs_info->work); |
546 | } | 549 | } |
547 | 550 | ||
548 | static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | 551 | static int cpufreq_governor_dbs(struct cpufreq_policy *policy, |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 338f428a15b7..e741c339df76 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -98,6 +98,9 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */ | |||
98 | * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then | 98 | * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then |
99 | * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock | 99 | * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock |
100 | * is recursive for the same process. -Venki | 100 | * is recursive for the same process. -Venki |
101 | * DEADLOCK ALERT! (2) : do_dbs_timer() must not take the dbs_mutex, because it | ||
102 | * would deadlock with cancel_delayed_work_sync(), which is needed for proper | ||
103 | * raceless workqueue teardown. | ||
101 | */ | 104 | */ |
102 | static DEFINE_MUTEX(dbs_mutex); | 105 | static DEFINE_MUTEX(dbs_mutex); |
103 | 106 | ||
@@ -562,7 +565,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) | |||
562 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) | 565 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) |
563 | { | 566 | { |
564 | dbs_info->enable = 0; | 567 | dbs_info->enable = 0; |
565 | cancel_delayed_work(&dbs_info->work); | 568 | cancel_delayed_work_sync(&dbs_info->work); |
566 | } | 569 | } |
567 | 570 | ||
568 | static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | 571 | static int cpufreq_governor_dbs(struct cpufreq_policy *policy, |