ACPICA: Add time macros for various timer/time manipulation.

Constants for time manipulation, including constants for the 100
nanosecond timers. Chao Guan, Bob Moore, Lv Zheng.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Bob Moore
2012-12-31 00:05:46 +00:00
committed by Rafael J. Wysocki
parent c8d586f8ed
commit c41679a448
4 changed files with 22 additions and 6 deletions
+4 -3
View File
@@ -176,10 +176,11 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
/*
* Compute Duration (Requires a 64-bit multiply and divide):
*
* time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY;
* time_elapsed (microseconds) =
* (delta_ticks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY;
*/
status = acpi_ut_short_divide(((u64) delta_ticks) * 1000000,
PM_TIMER_FREQUENCY, &quotient, NULL);
status = acpi_ut_short_divide(((u64)delta_ticks) * ACPI_USEC_PER_SEC,
ACPI_PM_TIMER_FREQUENCY, &quotient, NULL);
*time_elapsed = (u32) quotient;
return_ACPI_STATUS(status);