Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
7329e935
Commit
7329e935
authored
Apr 05, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'psd' into release
parents
3266d63c
e1eb4779
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
25 deletions
+21
-25
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+21
-25
No files found.
drivers/acpi/processor_perflib.c
View file @
7329e935
...
...
@@ -479,6 +479,13 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
goto
end
;
}
if
(
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_SW_ALL
&&
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_SW_ANY
&&
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_HW_ALL
)
{
printk
(
KERN_ERR
PREFIX
"Invalid _PSD:coord_type
\n
"
);
result
=
-
EFAULT
;
goto
end
;
}
end:
kfree
(
buffer
.
pointer
);
return
result
;
...
...
@@ -501,9 +508,10 @@ int acpi_processor_preregister_performance(
mutex_lock
(
&
performance_mutex
);
retval
=
0
;
/* Call _PSD for all CPUs */
/*
* Check if another driver has already registered, and abort before
* changing pr->performance if it has. Check input data as well.
*/
for_each_possible_cpu
(
i
)
{
pr
=
per_cpu
(
processors
,
i
);
if
(
!
pr
)
{
...
...
@@ -513,13 +521,20 @@ int acpi_processor_preregister_performance(
if
(
pr
->
performance
)
{
retval
=
-
EBUSY
;
continue
;
goto
err_out
;
}
if
(
!
performance
||
!
percpu_ptr
(
performance
,
i
))
{
retval
=
-
EINVAL
;
continue
;
goto
err_out
;
}
}
/* Call _PSD for all CPUs */
for_each_possible_cpu
(
i
)
{
pr
=
per_cpu
(
processors
,
i
);
if
(
!
pr
)
continue
;
pr
->
performance
=
percpu_ptr
(
performance
,
i
);
cpumask_set_cpu
(
i
,
pr
->
performance
->
shared_cpu_map
);
...
...
@@ -535,26 +550,6 @@ int acpi_processor_preregister_performance(
* Now that we have _PSD data from all CPUs, lets setup P-state
* domain info.
*/
for_each_possible_cpu
(
i
)
{
pr
=
per_cpu
(
processors
,
i
);
if
(
!
pr
)
continue
;
/* Basic validity check for domain info */
pdomain
=
&
(
pr
->
performance
->
domain_info
);
if
((
pdomain
->
revision
!=
ACPI_PSD_REV0_REVISION
)
||
(
pdomain
->
num_entries
!=
ACPI_PSD_REV0_ENTRIES
))
{
retval
=
-
EINVAL
;
goto
err_ret
;
}
if
(
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_SW_ALL
&&
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_SW_ANY
&&
pdomain
->
coord_type
!=
DOMAIN_COORD_TYPE_HW_ALL
)
{
retval
=
-
EINVAL
;
goto
err_ret
;
}
}
cpumask_clear
(
covered_cpus
);
for_each_possible_cpu
(
i
)
{
pr
=
per_cpu
(
processors
,
i
);
...
...
@@ -643,6 +638,7 @@ err_ret:
pr
->
performance
=
NULL
;
/* Will be set for real in register */
}
err_out:
mutex_unlock
(
&
performance_mutex
);
free_cpumask_var
(
covered_cpus
);
return
retval
;
...
...
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