acpitimer(4): add acpitimer_delay(), another delay(9) implementation
authorcheloha <cheloha@openbsd.org>
Thu, 25 Aug 2022 17:43:34 +0000 (17:43 +0000)
committercheloha <cheloha@openbsd.org>
Thu, 25 Aug 2022 17:43:34 +0000 (17:43 +0000)
commita00231d340020db0232bb030f473bb495df86d01
tree73df15797851963b6c3bf0dfda49c11d9c85aab3
parentda893f172441e856e26b2082d78d08217a8ba3e5
acpitimer(4): add acpitimer_delay(), another delay(9) implementation

When lapic_delay() is removed from the tree in the near future, older
machines without a constant/invariant TSC will need a delay(9)
implementation better than i8254_delay().

This patch adds acpitimer_delay(), a delay(9) implementation based on
the ACPI PM timer.  It is only preferable to i8254_delay(), so set its
quality to 1000.

With input from jsg@.

Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2
ok mlarkin@ jsg@
sys/dev/acpi/acpitimer.c