Skip to content
  • ian's avatar
    Protect access to the AT realtime clock with its own mutex. · 24259940
    ian authored
    The mutex protecting access to the registered realtime clock should not be
    overloaded to protect access to the atrtc hardware, which might not even be
    the registered rtc. More importantly, the resettodr mutex needs to be
    eliminated to remove locking/sleeping restrictions on clock drivers, and
    that can't happen if MD code for amd64 depends on it. This change moves the
    protection into what's really being protected: access to the atrtc date and
    time registers.
    
    This change also adds protection when the clock is accessed from
    xentimer_settime(), which bypasses the resettodr locking.
    
    Differential Revision:	https://reviews.freebsd.org/D11483
    24259940