mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
[CPUFREQ] revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"
395913d0b1db37092ea3d9d69b832183b1dd84c5 ("[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)") is not needed, because there is no rwsem lock in cpufreq_ondemand and cpufreq_conservative anymore. Lock should not be released until the work done. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=1594 Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
dbbe4649d6
commit
ffe6275f90
@ -1762,17 +1762,8 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data,
|
|||||||
dprintk("governor switch\n");
|
dprintk("governor switch\n");
|
||||||
|
|
||||||
/* end old governor */
|
/* end old governor */
|
||||||
if (data->governor) {
|
if (data->governor)
|
||||||
/*
|
|
||||||
* Need to release the rwsem around governor
|
|
||||||
* stop due to lock dependency between
|
|
||||||
* cancel_delayed_work_sync and the read lock
|
|
||||||
* taken in the delayed work handler.
|
|
||||||
*/
|
|
||||||
unlock_policy_rwsem_write(data->cpu);
|
|
||||||
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
|
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
|
||||||
lock_policy_rwsem_write(data->cpu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* start new governor */
|
/* start new governor */
|
||||||
data->governor = policy->governor;
|
data->governor = policy->governor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user