amd64: add delay_fini()
authorcheloha <cheloha@openbsd.org>
Tue, 8 Nov 2022 14:46:51 +0000 (14:46 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 8 Nov 2022 14:46:51 +0000 (14:46 +0000)
commit040db72ba29053e5c7f852cb645ec9cb932011b4
treedba470c1756125fba84a39f08a39e4a4cc8d2e1c
parent6cb026234e9f97a75764a19a777633eea7d3eab0
amd64: add delay_fini()

Not all of the clocks with a delay(9) implementation necessarily keep
ticking across suspend/resume.  We need a clean way to reverse
delay_init() during suspend when those clocks stop ticking.

Hence, delay_fini().  delay_fini() resets delay_func() to
i8254_delay() if the given function pointer is the active delay(9)
implementation.

ok mlarkin@
sys/arch/amd64/amd64/machdep.c
sys/arch/amd64/include/cpu.h