Skip to content

Commit

Permalink
ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read
Browse files Browse the repository at this point in the history
ACPICA commit 1cdcf16447c15694faa564c0cd8e357b910344a0

Return value from acpi_hw_read is now 64 bits, but the ACPI PM
Timer is defined by the ACPI spec to be 32 bits.

Link: https://github.com/acpica/acpica/commit/1cdcf16447c1
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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Oct 3, 2017
1 parent c2e56e5 commit 8092936
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/acpi/acpica/hwtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution)
acpi_status acpi_get_timer(u32 * ticks)
{
acpi_status status;
u64 timer_value;

ACPI_FUNCTION_TRACE(acpi_get_timer);

Expand All @@ -107,7 +108,14 @@ acpi_status acpi_get_timer(u32 * ticks)
return_ACPI_STATUS(AE_SUPPORT);
}

status = acpi_hw_read(ticks, &acpi_gbl_FADT.xpm_timer_block);
status = acpi_hw_read(&timer_value, &acpi_gbl_FADT.xpm_timer_block);
if (ACPI_SUCCESS(status)) {

/* ACPI PM Timer is defined to be 32 bits (PM_TMR_LEN) */

*ticks = (u32)timer_value;
}

return_ACPI_STATUS(status);
}

Expand Down

0 comments on commit 8092936

Please sign in to comment.