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
e82b7457
Commit
e82b7457
authored
Oct 31, 2019
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-cpufreq'
* pm-cpufreq: ACPI: processor: Add QoS requests for all CPUs
parents
767d2d71
a1bb46c3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
26 deletions
+42
-26
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+21
-13
drivers/acpi/processor_thermal.c
drivers/acpi/processor_thermal.c
+21
-13
No files found.
drivers/acpi/processor_perflib.c
View file @
e82b7457
...
...
@@ -159,26 +159,34 @@ void acpi_processor_ignore_ppc_init(void)
void
acpi_processor_ppc_init
(
struct
cpufreq_policy
*
policy
)
{
int
cpu
=
policy
->
cpu
;
unsigned
int
cpu
;
for_each_cpu
(
cpu
,
policy
->
related_cpus
)
{
struct
acpi_processor
*
pr
=
per_cpu
(
processors
,
cpu
);
int
ret
;
if
(
!
pr
)
return
;
continue
;
ret
=
freq_qos_add_request
(
&
policy
->
constraints
,
&
pr
->
perflib_req
,
ret
=
freq_qos_add_request
(
&
policy
->
constraints
,
&
pr
->
perflib_req
,
FREQ_QOS_MAX
,
INT_MAX
);
if
(
ret
<
0
)
pr_err
(
"Failed to add freq constraint for CPU%d (%d)
\n
"
,
cpu
,
ret
);
pr_err
(
"Failed to add freq constraint for CPU%d (%d)
\n
"
,
cpu
,
ret
);
}
}
void
acpi_processor_ppc_exit
(
struct
cpufreq_policy
*
policy
)
{
struct
acpi_processor
*
pr
=
per_cpu
(
processors
,
policy
->
cpu
);
unsigned
int
cpu
;
for_each_cpu
(
cpu
,
policy
->
related_cpus
)
{
struct
acpi_processor
*
pr
=
per_cpu
(
processors
,
cpu
);
if
(
pr
)
freq_qos_remove_request
(
&
pr
->
perflib_req
);
}
}
static
int
acpi_processor_get_performance_control
(
struct
acpi_processor
*
pr
)
...
...
drivers/acpi/processor_thermal.c
View file @
e82b7457
...
...
@@ -127,26 +127,34 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)
void
acpi_thermal_cpufreq_init
(
struct
cpufreq_policy
*
policy
)
{
int
cpu
=
policy
->
cpu
;
unsigned
int
cpu
;
for_each_cpu
(
cpu
,
policy
->
related_cpus
)
{
struct
acpi_processor
*
pr
=
per_cpu
(
processors
,
cpu
);
int
ret
;
if
(
!
pr
)
return
;
continue
;
ret
=
freq_qos_add_request
(
&
policy
->
constraints
,
&
pr
->
thermal_req
,
ret
=
freq_qos_add_request
(
&
policy
->
constraints
,
&
pr
->
thermal_req
,
FREQ_QOS_MAX
,
INT_MAX
);
if
(
ret
<
0
)
pr_err
(
"Failed to add freq constraint for CPU%d (%d)
\n
"
,
cpu
,
ret
);
pr_err
(
"Failed to add freq constraint for CPU%d (%d)
\n
"
,
cpu
,
ret
);
}
}
void
acpi_thermal_cpufreq_exit
(
struct
cpufreq_policy
*
policy
)
{
unsigned
int
cpu
;
for_each_cpu
(
cpu
,
policy
->
related_cpus
)
{
struct
acpi_processor
*
pr
=
per_cpu
(
processors
,
policy
->
cpu
);
if
(
pr
)
freq_qos_remove_request
(
&
pr
->
thermal_req
);
}
}
#else
/* ! CONFIG_CPU_FREQ */
static
int
cpufreq_get_max_state
(
unsigned
int
cpu
)
...
...
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