From owner-cvs-all Thu Oct 17 6:55:56 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18D6437B401; Thu, 17 Oct 2002 06:55:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D025943E6A; Thu, 17 Oct 2002 06:55:54 -0700 (PDT) (envelope-from iwasaki@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9HDtjmV054704; Thu, 17 Oct 2002 06:55:46 -0700 (PDT) (envelope-from iwasaki@repoman.freebsd.org) Received: (from iwasaki@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9HDtjBt054703; Thu, 17 Oct 2002 06:55:45 -0700 (PDT) Message-Id: <200210171355.g9HDtjBt054703@repoman.freebsd.org> From: Mitsuru IWASAKI Date: Thu, 17 Oct 2002 06:55:44 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/isa clock.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iwasaki 2002/10/17 06:55:44 PDT Modified files: sys/i386/isa clock.c Log: 1. Fix a comment. Locking _is_ needed (but not done). 2. Update a comment. We now restore much more than RTC updates and interrupts. 3. Order change. Stop interrupts by writing to RTC_STATUSB, restore rate bits for the interrupts by writing to RTC_STATUSA, then enable interrupts again. This seems to be done perfectly backwards in startrtclock(). Otherwise, the idea for this change was obtained from startrtclock(). 4. Don't stop the clock (RTCB_HALT). We only program some control bits and don't want to stop the clock. 5. (Not really related.) Add caveats to the comment about timer_restore(). The update is non-atomic since locking is not done. On locking: 6. rtcin() and writertc() are locked() adequately by splhigh() in RELENG_4, but this locking is null in -current. 7. Doing things in the correct order in (3) combined with (6) is probably enough locking for rtcrestore() in RELENG_4. In -current, the writertc()'s race with rtcintr() unless the BIOS disables RTC interrupts. Submitted by: bde (including commit message) MFC after: 1 week Revision Changes Path 1.190 +8 -12 src/sys/i386/isa/clock.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message