Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2013 00:40:08 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r247068 - head/sys/x86/isa
Message-ID:  <201302210040.r1L0e80m095140@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Feb 21 00:40:08 2013
New Revision: 247068
URL: http://svnweb.freebsd.org/changeset/base/247068

Log:
  Fix broken usage of splhigh() by removing it.

Modified:
  head/sys/x86/isa/atrtc.c

Modified: head/sys/x86/isa/atrtc.c
==============================================================================
--- head/sys/x86/isa/atrtc.c	Thu Feb 21 00:36:12 2013	(r247067)
+++ head/sys/x86/isa/atrtc.c	Thu Feb 21 00:40:08 2013	(r247068)
@@ -328,7 +328,6 @@ static int
 atrtc_gettime(device_t dev, struct timespec *ts)
 {
 	struct clocktime ct;
-	int s;
 
 	/* Look if we have a RTC present and the time is valid */
 	if (!(rtcin(RTC_STATUSD) & RTCSD_PWR)) {
@@ -338,11 +337,8 @@ atrtc_gettime(device_t dev, struct times
 
 	/* wait for time update to complete */
 	/* If RTCSA_TUP is zero, we have at least 244us before next update */
-	s = splhigh();
-	while (rtcin(RTC_STATUSA) & RTCSA_TUP) {
-		splx(s);
-		s = splhigh();
-	}
+	while (rtcin(RTC_STATUSA) & RTCSA_TUP)
+		continue;
 	ct.nsec = 0;
 	ct.sec = readrtc(RTC_SEC);
 	ct.min = readrtc(RTC_MIN);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302210040.r1L0e80m095140>