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
Kirill Smelkov
linux
Commits
42807537
Commit
42807537
authored
Dec 11, 2020
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back cpufreq material for v5.11.
parents
05b8955f
bb025fb6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
91 deletions
+87
-91
drivers/cpufreq/cppc_cpufreq.c
drivers/cpufreq/cppc_cpufreq.c
+82
-81
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+5
-5
include/linux/cpufreq.h
include/linux/cpufreq.h
+0
-5
No files found.
drivers/cpufreq/cppc_cpufreq.c
View file @
42807537
This diff is collapsed.
Click to expand it.
drivers/cpufreq/cpufreq.c
View file @
42807537
...
...
@@ -2123,7 +2123,7 @@ static int __target_intermediate(struct cpufreq_policy *policy,
static
int
__target_index
(
struct
cpufreq_policy
*
policy
,
int
index
)
{
struct
cpufreq_freqs
freqs
=
{.
old
=
policy
->
cur
,
.
flags
=
0
};
unsigned
int
intermediate_freq
=
0
;
unsigned
int
restore_freq
,
intermediate_freq
=
0
;
unsigned
int
newfreq
=
policy
->
freq_table
[
index
].
frequency
;
int
retval
=
-
EINVAL
;
bool
notify
;
...
...
@@ -2131,6 +2131,9 @@ static int __target_index(struct cpufreq_policy *policy, int index)
if
(
newfreq
==
policy
->
cur
)
return
0
;
/* Save last value to restore later on errors */
restore_freq
=
policy
->
cur
;
notify
=
!
(
cpufreq_driver
->
flags
&
CPUFREQ_ASYNC_NOTIFICATION
);
if
(
notify
)
{
/* Handle switching to intermediate frequency */
...
...
@@ -2168,7 +2171,7 @@ static int __target_index(struct cpufreq_policy *policy, int index)
*/
if
(
unlikely
(
retval
&&
intermediate_freq
))
{
freqs
.
old
=
intermediate_freq
;
freqs
.
new
=
policy
->
restore_freq
;
freqs
.
new
=
restore_freq
;
cpufreq_freq_transition_begin
(
policy
,
&
freqs
);
cpufreq_freq_transition_end
(
policy
,
&
freqs
,
0
);
}
...
...
@@ -2203,9 +2206,6 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
!
(
cpufreq_driver
->
flags
&
CPUFREQ_NEED_UPDATE_LIMITS
))
return
0
;
/* Save last value to restore later on errors */
policy
->
restore_freq
=
policy
->
cur
;
if
(
cpufreq_driver
->
target
)
return
cpufreq_driver
->
target
(
policy
,
target_freq
,
relation
);
...
...
include/linux/cpufreq.h
View file @
42807537
...
...
@@ -65,7 +65,6 @@ struct cpufreq_policy {
unsigned
int
max
;
/* in kHz */
unsigned
int
cur
;
/* in kHz, only needed if cpufreq
* governors are used */
unsigned
int
restore_freq
;
/* = policy->cur before transition */
unsigned
int
suspend_freq
;
/* freq to set during suspend */
unsigned
int
policy
;
/* see above */
...
...
@@ -314,10 +313,6 @@ struct cpufreq_driver {
/* define one out of two */
int
(
*
setpolicy
)(
struct
cpufreq_policy
*
policy
);
/*
* On failure, should always restore frequency to policy->restore_freq
* (i.e. old freq).
*/
int
(
*
target
)(
struct
cpufreq_policy
*
policy
,
unsigned
int
target_freq
,
unsigned
int
relation
);
/* Deprecated */
...
...
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