HomeFreeBSD

stop and restart kernel event timers in the suspend / resume cycle

Description

stop and restart kernel event timers in the suspend / resume cycle

I have a system that is very unstable after resuming from suspend-to-RAM
but only if HPET is used as the event timer. The theory is that SMM
code / firmware could be enabling HPET for its own uses and unexpected
interrupts cause a trouble for it. Originally I wanted to solve the
problem in hpet_suspend() method, but that was insufficient as the event
timer could get reprogrammed again.

So, it's better, for my case and in general, to stop the event timer(s)
before entering the hardware suspend.

MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D15413