CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2022/08/25 11:54:33

Modified files:
        sys/dev/acpi   : acpihpet.c 

Log message:
acpihpet(4): add acpihpet_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 acpihpet_delay(), a delay(9) implementation based on
the ACPI HPET timer.  It is preferable to i8254_delay() (0) and
acpitimer_delay() (1000), so set its quality to 2000.

On newer machines, the HPET is slower to read than the PMT on newer
machines for reasons unknown, so _technically_ this quality hierarchy
is not always accurate.  However, we expect these newer machines to
have a constant/invariant TSC available, so the inaccuracy is harmless
because tsc_delay() will be available, which is better than both the
PMT and the HPET.

In general, on real hardware that predates wide availability of the
constant/invariant TSC, the HPET is preferable to the PMT.

With input from jsg@.

Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2

ok mlarkin@ jsg@

Reply via email to