[rtems commit] timecounter: Merge FreeBSD change r286429

Sebastian Huber sebh at rtems.org
Thu Oct 12 05:07:02 UTC 2017

Module:    rtems
Branch:    master
Commit:    749468112b29b70f4c08ef4de133dfad2194b7a2
Changeset: http://git.rtems.org/rtems/commit/?id=749468112b29b70f4c08ef4de133dfad2194b7a2

Author:    Ian Lepore <ian at FreeBSD.org>
Date:      Fri Aug  7 23:31:31 2015 +0000

timecounter: Merge FreeBSD change r286429

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.

Update #3175.


 cpukit/score/src/kern_tc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index a789107..bb8a3f1 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -1902,6 +1902,9 @@ pps_event(struct pps_state *pps, int event)
 	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 !=

More information about the vc mailing list