From owner-svn-src-all@freebsd.org Fri Aug 11 19:02:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02346D9441F; Fri, 11 Aug 2017 19:02:13 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C37E7837AF; Fri, 11 Aug 2017 19:02:12 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7BJ2BkI038632; Fri, 11 Aug 2017 19:02:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7BJ2BEG038353; Fri, 11 Aug 2017 19:02:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708111902.v7BJ2BEG038353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 11 Aug 2017 19:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322411 - in head/sys: dev/xen/timer isa x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: dev/xen/timer isa x86/isa X-SVN-Commit-Revision: 322411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 19:02:13 -0000 Author: ian Date: Fri Aug 11 19:02:11 2017 New Revision: 322411 URL: https://svnweb.freebsd.org/changeset/base/322411 Log: Stop calling atrtc_set() from the xen timer clock_settime() method. That removes the only reference to atrtc_set() from outside of atrtc.c, so make it static. The xen timer driver registers as a realtime clock with 1us resolution. In the past that resulted in only the xen timer's clock_settime() getting called, so it would call atrtc_set() to set the hardware clock as well. As of r32090, the clock_settime() method of all registered realtime clocks gets called, so the xen driver no longer needs to chain-call the lower-resolution driver. Thanks to royger@ for talking me through the xen stuff, and for testing. Modified: head/sys/dev/xen/timer/timer.c head/sys/isa/rtc.h head/sys/x86/isa/atrtc.c Modified: head/sys/dev/xen/timer/timer.c ============================================================================== --- head/sys/dev/xen/timer/timer.c Fri Aug 11 18:43:52 2017 (r322410) +++ head/sys/dev/xen/timer/timer.c Fri Aug 11 19:02:11 2017 (r322411) @@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$"); #include -#include - #include "clock_if.h" static devclass_t xentimer_devclass; @@ -228,9 +226,6 @@ xentimer_settime(device_t dev __unused, struct timespe */ if (!xen_initial_domain()) return (0); - - /* Set the native RTC. */ - atrtc_set(ts); settime.cmd = XENPF_settime64; settime.u.settime64.mbz = 0; Modified: head/sys/isa/rtc.h ============================================================================== --- head/sys/isa/rtc.h Fri Aug 11 18:43:52 2017 (r322410) +++ head/sys/isa/rtc.h Fri Aug 11 19:02:11 2017 (r322411) @@ -118,7 +118,6 @@ extern int atrtcclock_disable; int rtcin(int reg); void atrtc_restore(void); void writertc(int reg, u_char val); -void atrtc_set(struct timespec *ts); #endif #endif /* _I386_ISA_RTC_H_ */ Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Fri Aug 11 18:43:52 2017 (r322410) +++ head/sys/x86/isa/atrtc.c Fri Aug 11 19:02:11 2017 (r322411) @@ -164,7 +164,7 @@ atrtc_restore(void) rtcin(RTC_INTR); } -void +static void atrtc_set(struct timespec *ts) { struct clocktime ct;