Lines 663-668
Link Here
|
663 |
seq_puts(seq, "states:\n"); |
663 |
seq_puts(seq, "states:\n"); |
664 |
|
664 |
|
665 |
for (i = 1; i <= pr->power.count; i++) { |
665 |
for (i = 1; i <= pr->power.count; i++) { |
|
|
666 |
u64 idle_time = 0; |
666 |
seq_printf(seq, " %cC%d: ", |
667 |
seq_printf(seq, " %cC%d: ", |
667 |
(&pr->power.states[i] == |
668 |
(&pr->power.states[i] == |
668 |
pr->power.state ? '*' : ' '), i); |
669 |
pr->power.state ? '*' : ' '), i); |
Lines 701-710
Link Here
|
701 |
else |
702 |
else |
702 |
seq_puts(seq, "demotion[--] "); |
703 |
seq_puts(seq, "demotion[--] "); |
703 |
|
704 |
|
|
|
705 |
idle_time = pr->power.states[i].time; |
704 |
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n", |
706 |
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n", |
705 |
pr->power.states[i].latency, |
707 |
pr->power.states[i].latency, |
706 |
pr->power.states[i].usage, |
708 |
pr->power.states[i].usage, |
707 |
(unsigned long long)pr->power.states[i].time); |
709 |
(unsigned long long)us_to_pm_timer_ticks(idle_time)); |
708 |
} |
710 |
} |
709 |
|
711 |
|
710 |
end: |
712 |
end: |
Lines 873-882
Link Here
|
873 |
if (tsc_halts_in_c(cx->type)) |
875 |
if (tsc_halts_in_c(cx->type)) |
874 |
mark_tsc_unstable("TSC halts in idle");; |
876 |
mark_tsc_unstable("TSC halts in idle");; |
875 |
#endif |
877 |
#endif |
876 |
sleep_ticks = us_to_pm_timer_ticks(idle_time); |
878 |
/* sleep_ticks = us_to_pm_timer_ticks(idle_time); */ |
877 |
|
879 |
|
878 |
/* Tell the scheduler how much we idled: */ |
880 |
/* Tell the scheduler how much we idled: */ |
879 |
sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); |
881 |
sched_clock_idle_wakeup_event(idle_time * 1000); |
880 |
|
882 |
|
881 |
local_irq_enable(); |
883 |
local_irq_enable(); |
882 |
current_thread_info()->status |= TS_POLLING; |
884 |
current_thread_info()->status |= TS_POLLING; |
Lines 884-890
Link Here
|
884 |
cx->usage++; |
886 |
cx->usage++; |
885 |
|
887 |
|
886 |
acpi_state_timer_broadcast(pr, cx, 0); |
888 |
acpi_state_timer_broadcast(pr, cx, 0); |
887 |
cx->time += sleep_ticks; |
889 |
cx->time += idle_time; |
888 |
return idle_time; |
890 |
return idle_time; |
889 |
} |
891 |
} |
890 |
|
892 |
|
Lines 991-999
Link Here
|
991 |
if (tsc_halts_in_c(ACPI_STATE_C3)) |
993 |
if (tsc_halts_in_c(ACPI_STATE_C3)) |
992 |
mark_tsc_unstable("TSC halts in idle"); |
994 |
mark_tsc_unstable("TSC halts in idle"); |
993 |
#endif |
995 |
#endif |
994 |
sleep_ticks = us_to_pm_timer_ticks(idle_time); |
|
|
995 |
/* Tell the scheduler how much we idled: */ |
996 |
/* Tell the scheduler how much we idled: */ |
996 |
sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); |
997 |
sched_clock_idle_wakeup_event(idle_time * 1000); |
997 |
|
998 |
|
998 |
local_irq_enable(); |
999 |
local_irq_enable(); |
999 |
current_thread_info()->status |= TS_POLLING; |
1000 |
current_thread_info()->status |= TS_POLLING; |
Lines 1001-1007
Link Here
|
1001 |
cx->usage++; |
1002 |
cx->usage++; |
1002 |
|
1003 |
|
1003 |
acpi_state_timer_broadcast(pr, cx, 0); |
1004 |
acpi_state_timer_broadcast(pr, cx, 0); |
1004 |
cx->time += sleep_ticks; |
1005 |
cx->time += idle_time; |
1005 |
return idle_time; |
1006 |
return idle_time; |
1006 |
} |
1007 |
} |
1007 |
|
1008 |
|