Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0211af97
Commit
0211af97
authored
Feb 10, 2004
by
Dave Jones
Committed by
Dave Jones
Feb 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Fix deadlock in userspace governor.
Another fix from Dominik.
parent
c40aabb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
drivers/cpufreq/cpufreq_userspace.c
drivers/cpufreq/cpufreq_userspace.c
+9
-2
No files found.
drivers/cpufreq/cpufreq_userspace.c
View file @
0211af97
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* linux/drivers/cpufreq/cpufreq_userspace.c
* linux/drivers/cpufreq/cpufreq_userspace.c
*
*
* Copyright (C) 2001 Russell King
* Copyright (C) 2001 Russell King
* (C) 2002 - 200
3
Dominik Brodowski <linux@brodo.de>
* (C) 2002 - 200
4
Dominik Brodowski <linux@brodo.de>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
...
@@ -112,7 +112,14 @@ int cpufreq_set(unsigned int freq, unsigned int cpu)
...
@@ -112,7 +112,14 @@ int cpufreq_set(unsigned int freq, unsigned int cpu)
if
(
freq
>
cpu_max_freq
[
cpu
])
if
(
freq
>
cpu_max_freq
[
cpu
])
freq
=
cpu_max_freq
[
cpu
];
freq
=
cpu_max_freq
[
cpu
];
ret
=
cpufreq_driver_target
(
&
current_policy
[
cpu
],
freq
,
/*
* We're safe from concurrent calls to ->target() here
* as we hold the userspace_sem lock. If we were calling
* cpufreq_driver_target, a deadlock situation might occur:
* A: cpufreq_set (lock userspace_sem) -> cpufreq_driver_target(lock policy->lock)
* B: cpufreq_set_policy(lock policy->lock) -> __cpufreq_governor -> cpufreq_governor_userspace (lock userspace_sem)
*/
ret
=
__cpufreq_driver_target
(
&
current_policy
[
cpu
],
freq
,
CPUFREQ_RELATION_L
);
CPUFREQ_RELATION_L
);
err:
err:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment