CVSROOT:        /cvs
Module name:    src
Changes by:     chel...@cvs.openbsd.org 2019/05/22 10:11:21

Modified files:
        sys/arch/i386/i386: apm.c 

Log message:
i386/amd64 apm(4): Ignore APM_UPDATE_TIME events.

The APM spec defines an APM_UPDATE_TIME event that is meant to cause
the driver to rebase the system's wallclock against the RTC.  The
event itself is apparently caused by occasional blackout periods where
interrupts cannot be delivered, which might cause the system to miss a tick.

The problem is that on systems where these events are frequent this
constantly erodes the system wallclock.  The RTC is not the greatest
clock in the world so these systems are always playing catch-up.

ntpd(8) is a far better clock corrector than rebasing against the RTC,
so it should be safe to simply ignore the event.  We continue to record
the event for userspace listeners, but we do not call inittodr(9) on
receipt of the event.

Linux has ignored the event since v2.6.21:

https://github.com/torvalds/linux/commit/c1d370e167d66b10bca3b602d3740405469383de#diff-d85b9a44da8e5dfb2fb1bcbd304c2a6c

Discovered by jcs@.  Discussed a bit with jcs@, tedu@, deraadt@.  Fix
tested by jcs@.

"I think we should ignore the event" deraadt@

Reply via email to