i386: add delay_fini()
authorcheloha <cheloha@openbsd.org>
Tue, 8 Nov 2022 14:49:20 +0000 (14:49 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 8 Nov 2022 14:49:20 +0000 (14:49 +0000)
commit6a987fc5894d3401681d5ab7aea41419009b814f
treea081d8039e1dd17b4a9788d13052961b5694d2f6
parent040db72ba29053e5c7f852cb645ec9cb932011b4
i386: 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/i386/i386/machdep.c
sys/arch/i386/include/cpu.h