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
85f1bb4a
Commit
85f1bb4a
authored
Jun 04, 2010
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'acpi-idle' into release
parents
b42f5b0f
bceefad5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+6
-11
No files found.
drivers/acpi/processor_idle.c
View file @
85f1bb4a
...
...
@@ -80,7 +80,7 @@ module_param(nocst, uint, 0000);
static
unsigned
int
latency_factor
__read_mostly
=
2
;
module_param
(
latency_factor
,
uint
,
0644
);
static
s
64
us_to_pm_timer_ticks
(
s64
t
)
static
u
64
us_to_pm_timer_ticks
(
s64
t
)
{
return
div64_u64
(
t
*
PM_TIMER_FREQUENCY
,
1000000
);
}
...
...
@@ -731,10 +731,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
seq_puts
(
seq
,
"demotion[--] "
);
seq_printf
(
seq
,
"latency[%03d] usage[%08d] duration[%020
ll
u]
\n
"
,
seq_printf
(
seq
,
"latency[%03d] usage[%08d] duration[%020
L
u]
\n
"
,
pr
->
power
.
states
[
i
].
latency
,
pr
->
power
.
states
[
i
].
usage
,
(
unsigned
long
long
)
pr
->
power
.
states
[
i
].
time
);
us_to_pm_timer_ticks
(
pr
->
power
.
states
[
i
].
time
)
);
}
end:
...
...
@@ -861,7 +861,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
pr
=
__get_cpu_var
(
processors
);
...
...
@@ -906,8 +905,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
idle_time
=
idle_time_ns
;
do_div
(
idle_time
,
NSEC_PER_USEC
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event
(
idle_time_ns
);
...
...
@@ -918,7 +915,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
cx
->
usage
++
;
lapic_timer_state_broadcast
(
pr
,
cx
,
0
);
cx
->
time
+=
sleep_ticks
;
cx
->
time
+=
idle_time
;
return
idle_time
;
}
...
...
@@ -940,7 +937,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
pr
=
__get_cpu_var
(
processors
);
...
...
@@ -1022,11 +1018,10 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
spin_unlock
(
&
c3_lock
);
}
kt2
=
ktime_get_real
();
idle_time_ns
=
ktime_to_
u
s
(
ktime_sub
(
kt2
,
kt1
));
idle_time_ns
=
ktime_to_
n
s
(
ktime_sub
(
kt2
,
kt1
));
idle_time
=
idle_time_ns
;
do_div
(
idle_time
,
NSEC_PER_USEC
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event
(
idle_time_ns
);
...
...
@@ -1037,7 +1032,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
cx
->
usage
++
;
lapic_timer_state_broadcast
(
pr
,
cx
,
0
);
cx
->
time
+=
sleep_ticks
;
cx
->
time
+=
idle_time
;
return
idle_time
;
}
...
...
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