diff options
-rw-r--r-- | drivers/acpi/processor_idle.c | 10 | ||||
-rw-r--r-- | include/acpi/processor.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 89d3fd4c3cd2..6d1e238e2375 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -322,8 +322,6 @@ static void acpi_processor_idle(void) | |||
322 | cx = &pr->power.states[ACPI_STATE_C1]; | 322 | cx = &pr->power.states[ACPI_STATE_C1]; |
323 | #endif | 323 | #endif |
324 | 324 | ||
325 | cx->usage++; | ||
326 | |||
327 | /* | 325 | /* |
328 | * Sleep: | 326 | * Sleep: |
329 | * ------ | 327 | * ------ |
@@ -430,6 +428,9 @@ static void acpi_processor_idle(void) | |||
430 | local_irq_enable(); | 428 | local_irq_enable(); |
431 | return; | 429 | return; |
432 | } | 430 | } |
431 | cx->usage++; | ||
432 | if ((cx->type != ACPI_STATE_C1) && (sleep_ticks > 0)) | ||
433 | cx->time += sleep_ticks; | ||
433 | 434 | ||
434 | next_state = pr->power.state; | 435 | next_state = pr->power.state; |
435 | 436 | ||
@@ -1053,9 +1054,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) | |||
1053 | else | 1054 | else |
1054 | seq_puts(seq, "demotion[--] "); | 1055 | seq_puts(seq, "demotion[--] "); |
1055 | 1056 | ||
1056 | seq_printf(seq, "latency[%03d] usage[%08d]\n", | 1057 | seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n", |
1057 | pr->power.states[i].latency, | 1058 | pr->power.states[i].latency, |
1058 | pr->power.states[i].usage); | 1059 | pr->power.states[i].usage, |
1060 | pr->power.states[i].time); | ||
1059 | } | 1061 | } |
1060 | 1062 | ||
1061 | end: | 1063 | end: |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 77371b3cdc44..9dd5b75961f8 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -62,6 +62,7 @@ struct acpi_processor_cx { | |||
62 | u32 latency_ticks; | 62 | u32 latency_ticks; |
63 | u32 power; | 63 | u32 power; |
64 | u32 usage; | 64 | u32 usage; |
65 | u64 time; | ||
65 | struct acpi_processor_cx_policy promotion; | 66 | struct acpi_processor_cx_policy promotion; |
66 | struct acpi_processor_cx_policy demotion; | 67 | struct acpi_processor_cx_policy demotion; |
67 | }; | 68 | }; |