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
49f6e706
Commit
49f6e706
authored
Dec 01, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/src/26-stable-dev
into intel.com:/home/lenb/src/26-latest-dev
parents
591e47a6
211001b9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
45 deletions
+42
-45
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+3
-4
drivers/acpi/osl.c
drivers/acpi/osl.c
+3
-3
drivers/acpi/processor.c
drivers/acpi/processor.c
+30
-32
include/acpi/processor.h
include/acpi/processor.h
+3
-3
include/linux/acpi.h
include/linux/acpi.h
+3
-3
No files found.
Documentation/kernel-parameters.txt
View file @
49f6e706
...
...
@@ -1006,10 +1006,9 @@ running once the system is up.
(param: profile step/bucket size as a power of 2 for
statistical time based profiling)
processor.c2= [HW, ACPI]
processor.c3= [HW, ACPI]
0 - disable C2 or C3 idle power saving state.
1 - enable C2 or C3 (default unless DMI blacklist entry)
processor.max_cstate= [HW, ACPI]
Limit processor to maximum C-state
max_cstate=9 overrides any DMI blacklist limit.
prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
before loading.
...
...
drivers/acpi/osl.c
View file @
49f6e706
...
...
@@ -1152,10 +1152,10 @@ 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
*
max_cstate
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
;
unsigned
int
max_cstate
=
ACPI_C_STATES_MAX
;
EXPORT_SYMBOL
(
acpi_cstate_limit
);
EXPORT_SYMBOL
(
max_cstate
);
drivers/acpi/processor.c
View file @
49f6e706
...
...
@@ -101,8 +101,6 @@ static struct acpi_driver acpi_processor_driver = {
},
};
static
int
c2
=
-
1
;
static
int
c3
=
-
1
;
struct
acpi_processor_errata
{
u8
smp
;
...
...
@@ -144,8 +142,6 @@ static struct file_operations acpi_processor_limit_fops = {
static
struct
acpi_processor
*
processors
[
NR_CPUS
];
static
struct
acpi_processor_errata
errata
;
module_param_named
(
c2
,
c2
,
bool
,
0
);
module_param_named
(
c3
,
c3
,
bool
,
0
);
static
void
(
*
pm_idle_save
)(
void
);
...
...
@@ -343,8 +339,8 @@ acpi_processor_idle (void)
{
struct
acpi_processor
*
pr
=
NULL
;
struct
acpi_processor_cx
*
cx
=
NULL
;
int
next_state
=
0
;
int
sleep_ticks
=
0
;
unsigned
int
next_state
=
0
;
unsigned
int
sleep_ticks
=
0
;
u32
t1
,
t2
=
0
;
pr
=
processors
[
smp_processor_id
()];
...
...
@@ -480,9 +476,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
.
* Do not promote above
max_cstate
.
*/
if
(
cx
->
promotion
.
state
&&
(
cx
->
promotion
.
state
<=
acpi_cstate_limit
))
{
if
(
cx
->
promotion
.
state
&&
(
cx
->
promotion
.
state
<=
max_cstate
))
{
if
(
sleep_ticks
>
cx
->
promotion
.
threshold
.
ticks
)
{
cx
->
promotion
.
count
++
;
cx
->
demotion
.
count
=
0
;
...
...
@@ -520,10 +516,10 @@ acpi_processor_idle (void)
end:
/*
* Demote if current state exceeds
acpi_cstate_limit
* Demote if current state exceeds
max_cstate
*/
if
(
pr
->
power
.
state
>
acpi_cstate_limit
)
{
next_state
=
acpi_cstate_limit
;
if
(
pr
->
power
.
state
>
max_cstate
)
{
next_state
=
max_cstate
;
}
/*
...
...
@@ -677,11 +673,6 @@ acpi_processor_get_power_info (
else
if
(
errata
.
smp
)
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"C2 not supported in SMP mode
\n
"
));
else
if
(
!
c2
)
printk
(
KERN_INFO
"C2 disabled
\n
"
);
/*
* Otherwise we've met all of our C2 requirements.
* Normalize the C2 latency to expidite policy.
...
...
@@ -737,9 +728,6 @@ acpi_processor_get_power_info (
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"C3 not supported on PIIX4 with Type-F DMA
\n
"
));
}
else
if
(
!
c3
)
printk
(
KERN_INFO
"C3 disabled
\n
"
);
/*
* Otherwise we've met all of our C3 requirements.
* Normalize the C2 latency to expidite policy. Enable
...
...
@@ -1007,7 +995,7 @@ acpi_processor_get_performance_states (
struct
acpi_buffer
format
=
{
sizeof
(
"NNNNNN"
),
"NNNNNN"
};
struct
acpi_buffer
state
=
{
0
,
NULL
};
union
acpi_object
*
pss
=
NULL
;
int
i
=
0
;
unsigned
int
i
;
ACPI_FUNCTION_TRACE
(
"acpi_processor_get_performance_states"
);
...
...
@@ -1196,7 +1184,7 @@ static struct file_operations acpi_processor_perf_fops = {
static
int
acpi_processor_perf_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
int
i
=
0
;
unsigned
int
i
;
ACPI_FUNCTION_TRACE
(
"acpi_processor_perf_seq_show"
);
...
...
@@ -1956,7 +1944,7 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
static
int
acpi_processor_power_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
int
i
=
0
;
unsigned
int
i
;
ACPI_FUNCTION_TRACE
(
"acpi_processor_power_seq_show"
);
...
...
@@ -1965,9 +1953,11 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
seq_printf
(
seq
,
"active state: C%d
\n
"
"default state: C%d
\n
"
"max_cstate: C%d
\n
"
"bus master activity: %08x
\n
"
,
pr
->
power
.
state
,
pr
->
power
.
default_state
,
max_cstate
,
pr
->
power
.
bm_activity
);
seq_puts
(
seq
,
"states:
\n
"
);
...
...
@@ -2554,17 +2544,22 @@ acpi_processor_remove (
return_VALUE
(
0
);
}
/* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
For now disable this. Probably a bug somewhere else. */
/*
* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
* For now disable this. Probably a bug somewhere else.
*
* To skip this limit, boot/load with a large max_cstate limit.
*/
static
int
no_c2c3
(
struct
dmi_system_id
*
id
)
{
printk
(
KERN_INFO
"%s detected - C2,C3 disabled. Overwrite with
\"
processor.c2=1 processor.c3=1
\n\"
"
,
id
->
ident
);
if
(
c2
==
-
1
)
c2
=
0
;
if
(
c3
==
-
1
)
c3
=
0
;
if
(
max_cstate
>
ACPI_C_STATES_MAX
)
return
0
;
printk
(
KERN_NOTICE
PREFIX
"%s detected - C2,C3 disabled."
" Override with
\"
processor.max_cstate=9
\"\n
"
,
id
->
ident
);
max_cstate
=
1
;
return
0
;
}
...
...
@@ -2609,6 +2604,9 @@ acpi_processor_init (void)
dmi_check_system
(
processor_dmi_table
);
if
(
max_cstate
<
ACPI_C_STATES_MAX
)
printk
(
KERN_NOTICE
"ACPI: processor limited to max C-state %d
\n
"
,
max_cstate
);
return_VALUE
(
0
);
}
...
...
@@ -2632,6 +2630,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
);
module_param_named
(
max_cstate
,
max_cstate
,
uint
,
0
);
EXPORT_SYMBOL
(
acpi_processor_set_thermal_limit
);
include/acpi/processor.h
View file @
49f6e706
...
...
@@ -17,7 +17,7 @@
struct
acpi_processor_cx_policy
{
u32
count
;
int
state
;
u32
state
;
struct
{
u32
time
;
u32
ticks
;
...
...
@@ -38,8 +38,8 @@ struct acpi_processor_cx {
};
struct
acpi_processor_power
{
int
state
;
int
default_state
;
u32
state
;
u32
default_state
;
u32
bm_activity
;
struct
acpi_processor_cx
states
[
ACPI_PROCESSOR_MAX_POWER
];
};
...
...
include/linux/acpi.h
View file @
49f6e706
...
...
@@ -483,15 +483,15 @@ static inline int acpi_blacklisted(void)
* 2: C2 okay, but not C3 etc.
*/
extern
unsigned
int
acpi_cstate_limit
;
extern
unsigned
int
max_cstate
;
static
inline
unsigned
int
acpi_get_cstate_limit
(
void
)
{
return
acpi_cstate_limit
;
return
max_cstate
;
}
static
inline
void
acpi_set_cstate_limit
(
unsigned
int
new_limit
)
{
acpi_cstate_limit
=
new_limit
;
max_cstate
=
new_limit
;
return
;
}
#else
...
...
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