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
a3e945a6
Commit
a3e945a6
authored
Nov 05, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
f710ef2d
0ca608f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
drivers/acpi/osl.c
drivers/acpi/osl.c
+8
-0
drivers/acpi/processor.c
drivers/acpi/processor.c
+10
-1
include/linux/acpi.h
include/linux/acpi.h
+26
-0
No files found.
drivers/acpi/osl.c
View file @
a3e945a6
...
...
@@ -1125,3 +1125,11 @@ acpi_wake_gpes_always_on_setup(char *str)
__setup
(
"acpi_wake_gpes_always_on"
,
acpi_wake_gpes_always_on_setup
);
/*
* acpi_cstate_limit is defined in the base kernel so modules can
* change it w/o depending on the state of the processor module.
*/
unsigned
int
acpi_cstate_limit
=
ACPI_C_STATES_MAX
;
EXPORT_SYMBOL
(
acpi_cstate_limit
);
drivers/acpi/processor.c
View file @
a3e945a6
...
...
@@ -475,8 +475,9 @@ acpi_processor_idle (void)
* Track the number of longs (time asleep is greater than threshold)
* and promote when the count threshold is reached. Note that bus
* mastering activity may prevent promotions.
* Do not promote above acpi_cstate_limit.
*/
if
(
cx
->
promotion
.
state
)
{
if
(
cx
->
promotion
.
state
&&
(
cx
->
promotion
.
state
<=
acpi_cstate_limit
)
)
{
if
(
sleep_ticks
>
cx
->
promotion
.
threshold
.
ticks
)
{
cx
->
promotion
.
count
++
;
cx
->
demotion
.
count
=
0
;
...
...
@@ -513,6 +514,13 @@ acpi_processor_idle (void)
}
end:
/*
* Demote if current state exceeds acpi_cstate_limit
*/
if
(
pr
->
power
.
state
>
acpi_cstate_limit
)
{
next_state
=
acpi_cstate_limit
;
}
/*
* New Cx State?
* -------------
...
...
@@ -2543,5 +2551,6 @@ acpi_processor_exit (void)
module_init
(
acpi_processor_init
);
module_exit
(
acpi_processor_exit
);
module_param_named
(
acpi_cstate_limit
,
acpi_cstate_limit
,
uint
,
0
);
EXPORT_SYMBOL
(
acpi_processor_set_thermal_limit
);
include/linux/acpi.h
View file @
a3e945a6
...
...
@@ -473,4 +473,30 @@ static inline int acpi_blacklisted(void)
#endif
/*!CONFIG_ACPI_INTERPRETER*/
#define ACPI_CSTATE_LIMIT_DEFINED
/* for driver builds */
#ifdef CONFIG_ACPI
/*
* Set highest legal C-state
* 0: C0 okay, but not C1
* 1: C1 okay, but not C2
* 2: C2 okay, but not C3 etc.
*/
extern
unsigned
int
acpi_cstate_limit
;
static
inline
unsigned
int
acpi_get_cstate_limit
(
void
)
{
return
acpi_cstate_limit
;
}
static
inline
void
acpi_set_cstate_limit
(
unsigned
int
new_limit
)
{
acpi_cstate_limit
=
new_limit
;
return
;
}
#else
static
inline
unsigned
int
acpi_get_cstate_limit
(
void
)
{
return
0
;
}
static
inline
void
acpi_set_cstate_limit
(
unsigned
int
new_limit
)
{
return
;
}
#endif
#endif
/*_LINUX_ACPI_H*/
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