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
f1b2ad5d
Commit
f1b2ad5d
authored
Jun 29, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull c-states into release branch
parents
a51a69c0
c4a001b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+16
-19
include/acpi/processor.h
include/acpi/processor.h
+1
-0
No files found.
drivers/acpi/processor_idle.c
View file @
f1b2ad5d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2004
Dominik Brodowski <linux@brodo.de>
* Copyright (C) 2004
, 2005
Dominik Brodowski <linux@brodo.de>
* Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
* Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
* - Added processor hotplug support
* - Added processor hotplug support
* Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
* Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
...
@@ -264,21 +264,15 @@ static void acpi_processor_idle(void)
...
@@ -264,21 +264,15 @@ static void acpi_processor_idle(void)
u32
bm_status
=
0
;
u32
bm_status
=
0
;
unsigned
long
diff
=
jiffies
-
pr
->
power
.
bm_check_timestamp
;
unsigned
long
diff
=
jiffies
-
pr
->
power
.
bm_check_timestamp
;
if
(
diff
>
3
2
)
if
(
diff
>
3
1
)
diff
=
3
2
;
diff
=
3
1
;
while
(
diff
)
{
pr
->
power
.
bm_activity
<<=
diff
;
/* if we didn't get called, assume there was busmaster activity */
diff
--
;
if
(
diff
)
pr
->
power
.
bm_activity
|=
0x1
;
pr
->
power
.
bm_activity
<<=
1
;
}
acpi_get_register
(
ACPI_BITREG_BUS_MASTER_STATUS
,
acpi_get_register
(
ACPI_BITREG_BUS_MASTER_STATUS
,
&
bm_status
,
ACPI_MTX_DO_NOT_LOCK
);
&
bm_status
,
ACPI_MTX_DO_NOT_LOCK
);
if
(
bm_status
)
{
if
(
bm_status
)
{
pr
->
power
.
bm_activity
++
;
pr
->
power
.
bm_activity
|=
0x1
;
acpi_set_register
(
ACPI_BITREG_BUS_MASTER_STATUS
,
acpi_set_register
(
ACPI_BITREG_BUS_MASTER_STATUS
,
1
,
ACPI_MTX_DO_NOT_LOCK
);
1
,
ACPI_MTX_DO_NOT_LOCK
);
}
}
...
@@ -290,16 +284,16 @@ static void acpi_processor_idle(void)
...
@@ -290,16 +284,16 @@ static void acpi_processor_idle(void)
else
if
(
errata
.
piix4
.
bmisx
)
{
else
if
(
errata
.
piix4
.
bmisx
)
{
if
((
inb_p
(
errata
.
piix4
.
bmisx
+
0x02
)
&
0x01
)
if
((
inb_p
(
errata
.
piix4
.
bmisx
+
0x02
)
&
0x01
)
||
(
inb_p
(
errata
.
piix4
.
bmisx
+
0x0A
)
&
0x01
))
||
(
inb_p
(
errata
.
piix4
.
bmisx
+
0x0A
)
&
0x01
))
pr
->
power
.
bm_activity
++
;
pr
->
power
.
bm_activity
|=
0x1
;
}
}
pr
->
power
.
bm_check_timestamp
=
jiffies
;
pr
->
power
.
bm_check_timestamp
=
jiffies
;
/*
/*
*
Apply bus mastering demotion policy. Automatically
demote
*
If bus mastering is or was active this jiffy,
demote
* to avoid a faulty transition. Note that the processor
* to avoid a faulty transition. Note that the processor
* won't enter a low-power state during this call (to this
* won't enter a low-power state during this call (to this
* func
it
on) but should upon the next.
* func
ti
on) but should upon the next.
*
*
* TBD: A better policy might be to fallback to the demotion
* TBD: A better policy might be to fallback to the demotion
* state (use it for this quantum only) istead of
* state (use it for this quantum only) istead of
...
@@ -307,7 +301,8 @@ static void acpi_processor_idle(void)
...
@@ -307,7 +301,8 @@ static void acpi_processor_idle(void)
* qualification. This may, however, introduce DMA
* qualification. This may, however, introduce DMA
* issues (e.g. floppy DMA transfer overrun/underrun).
* issues (e.g. floppy DMA transfer overrun/underrun).
*/
*/
if
(
pr
->
power
.
bm_activity
&
cx
->
demotion
.
threshold
.
bm
)
{
if
((
pr
->
power
.
bm_activity
&
0x1
)
&&
cx
->
demotion
.
threshold
.
bm
)
{
local_irq_enable
();
local_irq_enable
();
next_state
=
cx
->
demotion
.
state
;
next_state
=
cx
->
demotion
.
state
;
goto
end
;
goto
end
;
...
@@ -325,8 +320,6 @@ static void acpi_processor_idle(void)
...
@@ -325,8 +320,6 @@ static void acpi_processor_idle(void)
cx
=
&
pr
->
power
.
states
[
ACPI_STATE_C1
];
cx
=
&
pr
->
power
.
states
[
ACPI_STATE_C1
];
#endif
#endif
cx
->
usage
++
;
/*
/*
* Sleep:
* Sleep:
* ------
* ------
...
@@ -435,6 +428,9 @@ static void acpi_processor_idle(void)
...
@@ -435,6 +428,9 @@ static void acpi_processor_idle(void)
local_irq_enable
();
local_irq_enable
();
return
;
return
;
}
}
cx
->
usage
++
;
if
((
cx
->
type
!=
ACPI_STATE_C1
)
&&
(
sleep_ticks
>
0
))
cx
->
time
+=
sleep_ticks
;
next_state
=
pr
->
power
.
state
;
next_state
=
pr
->
power
.
state
;
...
@@ -1058,9 +1054,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
...
@@ -1058,9 +1054,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
else
else
seq_puts
(
seq
,
"demotion[--] "
);
seq_puts
(
seq
,
"demotion[--] "
);
seq_printf
(
seq
,
"latency[%03d] usage[%08d]
\n
"
,
seq_printf
(
seq
,
"latency[%03d] usage[%08d]
duration[%020llu]
\n
"
,
pr
->
power
.
states
[
i
].
latency
,
pr
->
power
.
states
[
i
].
latency
,
pr
->
power
.
states
[
i
].
usage
);
pr
->
power
.
states
[
i
].
usage
,
pr
->
power
.
states
[
i
].
time
);
}
}
end:
end:
...
...
include/acpi/processor.h
View file @
f1b2ad5d
...
@@ -62,6 +62,7 @@ struct acpi_processor_cx {
...
@@ -62,6 +62,7 @@ struct acpi_processor_cx {
u32
latency_ticks
;
u32
latency_ticks
;
u32
power
;
u32
power
;
u32
usage
;
u32
usage
;
u64
time
;
struct
acpi_processor_cx_policy
promotion
;
struct
acpi_processor_cx_policy
promotion
;
struct
acpi_processor_cx_policy
demotion
;
struct
acpi_processor_cx_policy
demotion
;
};
};
...
...
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