Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199802
b: refs/heads/master
c: bceefad
h: refs/heads/master
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Len Brown committed Jun 4, 2010
1 parent 5aa2232 commit e08cd43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 157317ba3ec3e5a4d9683b8d24ba40b4f8f3296b
refs/heads/master: bceefad59ab66d1b1a815a1738744ea013da966e
15 changes: 5 additions & 10 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module_param(nocst, uint, 0000);
static unsigned int latency_factor __read_mostly = 2;
module_param(latency_factor, uint, 0644);

static s64 us_to_pm_timer_ticks(s64 t)
static u64 us_to_pm_timer_ticks(s64 t)
{
return div64_u64(t * PM_TIMER_FREQUENCY, 1000000);
}
Expand Down Expand Up @@ -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[%020llu]\n",
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020Lu]\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:
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand All @@ -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;
}

Expand All @@ -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);
Expand Down Expand Up @@ -1026,7 +1022,6 @@ static int acpi_idle_enter_bm(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);

Expand All @@ -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;
}

Expand Down

0 comments on commit e08cd43

Please sign in to comment.