From owner-svn-src-head@freebsd.org Fri Aug 7 23:31:32 2015 Return-Path: Delivered-To: svn-src-head@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 A0E7E9B644C; Fri, 7 Aug 2015 23:31:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 8B4B0126; Fri, 7 Aug 2015 23:31:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t77NVWhP003873; Fri, 7 Aug 2015 23:31:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t77NVWaK003872; Fri, 7 Aug 2015 23:31:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201508072331.t77NVWaK003872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 7 Aug 2015 23:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286429 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 23:31:32 -0000 Author: ian Date: Fri Aug 7 23:31:31 2015 New Revision: 286429 URL: https://svnweb.freebsd.org/changeset/base/286429 Log: Only process the PPS event types currently enabled in pps_params.mode. This makes the PPS API behave correctly, but isn't ideal -- we still end up capturing PPS data for non-enabled edges, we just don't process the data into an event that becomes visible outside of kern_tc. That's because the event type isn't passed to pps_capture(), so it can't do the filtering. Any solution for capture filtering is going to require touching every driver. Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Fri Aug 7 23:03:17 2015 (r286428) +++ head/sys/kern/kern_tc.c Fri Aug 7 23:31:31 2015 (r286429) @@ -1703,6 +1703,9 @@ pps_event(struct pps_state *pps, int eve #endif KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); + /* Nothing to do if not currently set to capture this event type. */ + if ((event & pps->ppsparam.mode) == 0) + return; /* If the timecounter was wound up underneath us, bail out. */ if (pps->capgen == 0 || pps->capgen != atomic_load_acq_int(&pps->capth->th_generation))