Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 23:18:52 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328069 - head/sys/x86/isa
Message-ID:  <201801162318.w0GNIqbl024547@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Jan 16 23:18:52 2018
New Revision: 328069
URL: https://svnweb.freebsd.org/changeset/base/328069

Log:
  Remove redundant critical_enter/exit() calls.  The block of code delimited
  by these calls is now protected by a spin mutex (obscured within the
  RTC_LOCK/RTC_UNLOCK macros).
  
  Reported by:	bde@

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

Modified: head/sys/x86/isa/atrtc.c
==============================================================================
--- head/sys/x86/isa/atrtc.c	Tue Jan 16 23:14:12 2018	(r328068)
+++ head/sys/x86/isa/atrtc.c	Tue Jan 16 23:18:52 2018	(r328069)
@@ -370,7 +370,6 @@ atrtc_gettime(device_t dev, struct timespec *ts)
 	mtx_lock(&atrtc_time_lock);
 	while (rtcin(RTC_STATUSA) & RTCSA_TUP)
 		continue;
-	critical_enter();
 	RTC_LOCK;
 	bct.sec  = rtcin_locked(RTC_SEC);
 	bct.min  = rtcin_locked(RTC_MIN);
@@ -382,7 +381,6 @@ atrtc_gettime(device_t dev, struct timespec *ts)
 	bct.year |= rtcin_locked(RTC_CENTURY) << 8;
 #endif
 	RTC_UNLOCK;
-	critical_exit();
 	mtx_unlock(&atrtc_time_lock);
 	/* dow is unused in timespec conversion and we have no nsec info. */
 	bct.dow  = 0;



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