From owner-freebsd-usb@freebsd.org Sun Aug 18 21:00:44 2019 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 076E8D0F9C for ; Sun, 18 Aug 2019 21:00:44 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46BTwq4jrmz3xwD for ; Sun, 18 Aug 2019 21:00:43 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 96EBFD0F92; Sun, 18 Aug 2019 21:00:43 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95246D0F91 for ; Sun, 18 Aug 2019 21:00:43 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46BTwq1yxSz3xvZ for ; Sun, 18 Aug 2019 21:00:43 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E58237DEB for ; Sun, 18 Aug 2019 21:00:42 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x7IL0gRD036839 for ; Sun, 18 Aug 2019 21:00:42 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x7IL0gGO036833 for usb@FreeBSD.org; Sun, 18 Aug 2019 21:00:42 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201908182100.x7IL0gGO036833@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: usb@FreeBSD.org Subject: Problem reports for usb@FreeBSD.org that need special attention Date: Sun, 18 Aug 2019 21:00:42 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2019 21:00:44 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 213877 | xhci reset causes panic on SuperMicro A1SRi-2758F Open | 233884 | Corsair CORSAIR K70 RGB MK.2 / K63 / K63 Wireless Open | 234578 | Support for Sierra Wireless EM7455 modem 3 problems total for which you should take action. From owner-freebsd-usb@freebsd.org Mon Aug 19 08:01:33 2019 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A67C0ACD89 for ; Mon, 19 Aug 2019 08:01:33 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 46BmbK3B6Gz4SLQ for ; Mon, 19 Aug 2019 08:01:33 +0000 (UTC) (envelope-from darius@dons.net.au) Received: by mailman.nyi.freebsd.org (Postfix) id 6B634ACD83; Mon, 19 Aug 2019 08:01:33 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B271ACD81 for ; Mon, 19 Aug 2019 08:01:33 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 46BmbJ3PcSz4SLM for ; Mon, 19 Aug 2019 08:01:32 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp118-210-70-93.adl-adc-lon-bras32.tpg.internode.on.net (HELO midget.dons.net.au) ([118.210.70.93]) by ipmail06.adl2.internode.on.net with ESMTP; 19 Aug 2019 17:31:06 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x7J80vBl043527 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 19 Aug 2019 17:31:02 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x7J7e2oX026023 for ; Mon, 19 Aug 2019 17:10:02 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from havok.gsoft.com.au (Havok.gsoft.com.au [203.31.81.177]) by ppp118-210-70-93.adl-adc-lon-bras32.tpg.internode.on.net (envelope-sender ) (MIMEDefang) with ESMTP id x7J7du16025725; Mon, 19 Aug 2019 17:10:02 +0930 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Is it a good idea to use a usb-serial adapter for PPS input? Yes, it is. From: "O'Connor, Daniel" In-Reply-To: <61B1AAF3-40F6-47BC-8F05-7491C13BF288@dons.net.au> Date: Mon, 19 Aug 2019 17:09:56 +0930 Cc: "usb@freebsd.org" , "freebsd-arm@FreeBSD.org" Content-Transfer-Encoding: 7bit Message-Id: <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> References: <61B1AAF3-40F6-47BC-8F05-7491C13BF288@dons.net.au> To: Ian Lepore X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Score: 0 () No, score=0.0 required=5.0 tests=SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 46BmbJ3PcSz4SLM X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of darius@dons.net.au has no SPF policy when checking 150.101.137.129) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [6.65 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(2.22)[ip: (5.82), ipnet: 150.101.0.0/16(3.63), asn: 4739(1.65), country: AU(0.01)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.94)[0.935,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[usb@freebsd.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.994,0]; DMARC_NA(0.00)[dons.net.au]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; RCVD_IN_DNSWL_NONE(0.00)[129.137.101.150.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[] X-Spam: Yes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2019 08:01:33 -0000 > On 12 Aug 2019, at 09:09, O'Connor, Daniel wrote: >> always get lost on single-core processors which are in cpu_idle() at >> the time the hardclock interrupt happens. (But that's fixable by just >> increasing the number of timehands, I think at least 4 are required.) > > OK, how do I increase the number of clock hands? I am going to try this diff but buildkernel is going to take a while... diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 2656fb4d2..00440b6a2 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -83,8 +83,48 @@ struct timehands { struct timehands *th_next; }; -static struct timehands th0; +static struct timehands th2; static struct timehands th1 = { + .th_next = &th2 +}; + +static struct timehands th3; +static struct timehands th2 = { + .th_next = &th3 +}; + +static struct timehands th4; +static struct timehands th3 = { + .th_next = &th4 +}; + +static struct timehands th5; +static struct timehands th4 = { + .th_next = &th5 +}; + +static struct timehands th6; +static struct timehands th5 = { + .th_next = &th6 +}; + +static struct timehands th7; +static struct timehands th6 = { + .th_next = &th7 +}; + +static struct timehands th8; +static struct timehands th7 = { + .th_next = &th8 +}; + +static struct timehands th9; +static struct timehands th8 = { + .th_next = &th9 +}; + +static struct timehands th0; +static struct timehands th9 = { .th_next = &th0 }; static struct timehands th0 = { -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum From owner-freebsd-usb@freebsd.org Mon Aug 19 14:26:48 2019 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21778C8144 for ; Mon, 19 Aug 2019 14:26:48 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46Bx7r04S3z3PKh for ; Mon, 19 Aug 2019 14:26:48 +0000 (UTC) (envelope-from ian@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 007CAC8142; Mon, 19 Aug 2019 14:26:48 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F365EC8141 for ; Mon, 19 Aug 2019 14:26:47 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Bx7q3mSmz3PKf for ; Mon, 19 Aug 2019 14:26:47 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1566224805; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=oM6oTFCEHZNdkQmxl6u0M9BN6ua+zI6nLpKWlM5Sm0Cw/uIJ0PHoyzfA2qsnyPKtmyzmTsDvj2yC2 73991igd2Go49hOLFAgFEfqguFWel83LRJ8KVs+eOFfyvmRcGnpxEMJt6XHvf2fQYSAIjQJrAVy7gk APSmuRoED4q0mEroxQVjy6EubcGtYQ/O4ahJPjKpoTvfF22TnRLKXU9Q9ujqnfSUKPo1LlBMevWPXX alMfplYjX6oXtGnAnax0cChsUsSicBWQTVAOWxlXdbHh9DAoenB9Jlg6+j8kzQBkNFrkFWqOPT+ap+ YSlVSteXyMeqvJ9bi2jmO5pouMXIuyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=dUhtPb/Y5GQIcYY8TWECX942zsMVTCQS4jJa0WpUPJA=; b=JQ6KnCU0xQioOrLnMPGi/1FrXnutrj+AF2xBSJSDx4fUHs/8V4Cu0zwWG/o/MMSIz3klFYJmw5QAS h2kC3/B9Y9j9sfe1KUxFWYcNb8YUfLyBn2R5YA57yDnjXgD8f2gcFBQMleFgXmIZt+QvshKDloZ6tX r4JnT0d4oIKYlQHx0i/sqzwrLPN1mONyvYhtccfRb2AhlIsECsIsXZ060UuakTASKUNfMUbcvVFZi/ Kkghbft1yxf1BvL6IRLOIbE6CCeD3W4PXvFKwx9lazgpILNQI4o/IlgkG5I6VZy3mxXpVxx6HGUi9I GHNzEbOAs3ZVqfCqxPh6Zo3qyYm4g/g== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=dUhtPb/Y5GQIcYY8TWECX942zsMVTCQS4jJa0WpUPJA=; b=fVXOnUf+gkoN5DNXHjC9SVKSHooihC5+tweDM8Lps1+/EB9i/JlNlNdnxdszBXbHHRj25yQDNMbEn gSBes40ep+5W6TSm57p2/dJ7tVe3tsAeBysJQmOUOKFBAE3iIiLp05oiP5w2sd6PcH5GgL2tI97/pV 0rZ1aaU8sj255aVK4R3bUdsJurAzYP7V4kiOL7KwZNFFjFxlnoEtOo4782xkzGWhG1zbp+u31ffwME HQiXjVhOupbGEYUdi9iRYVheBF0qeFZplT4muAYmoCYOxJm+BI8Mo/2xUI0NJjNr+SNV5hcb5qzQsA 8kxFnWxh3RNPwAD+dE1XjzZr2dthm4A== X-MHO-RoutePath: aGlwcGll X-MHO-User: 5d5bc8dc-c28d-11e9-85ec-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 5d5bc8dc-c28d-11e9-85ec-13b9aae3a1d2; Mon, 19 Aug 2019 14:26:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x7JEQggv075993; Mon, 19 Aug 2019 08:26:42 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: Is it a good idea to use a usb-serial adapter for PPS input? Yes, it is. From: Ian Lepore To: "O'Connor, Daniel" Cc: "usb@freebsd.org" , "freebsd-arm@FreeBSD.org" Date: Mon, 19 Aug 2019 08:26:42 -0600 In-Reply-To: <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> References: <61B1AAF3-40F6-47BC-8F05-7491C13BF288@dons.net.au> <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46Bx7q3mSmz3PKf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2019 14:26:48 -0000 On Mon, 2019-08-19 at 17:09 +0930, O'Connor, Daniel wrote: > > On 12 Aug 2019, at 09:09, O'Connor, Daniel > > wrote: > > > always get lost on single-core processors which are in cpu_idle() > > > at > > > the time the hardclock interrupt happens. (But that's fixable by > > > just > > > increasing the number of timehands, I think at least 4 are > > > required.) > > > > OK, how do I increase the number of clock hands? > > I am going to try this diff but buildkernel is going to take a > while... > > diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c > index 2656fb4d2..00440b6a2 100644 > --- a/sys/kern/kern_tc.c > +++ b/sys/kern/kern_tc.c > @@ -83,8 +83,48 @@ struct timehands { > struct timehands *th_next; > }; > > -static struct timehands th0; > +static struct timehands th2; > static struct timehands th1 = { > + .th_next = &th2 > +}; > + > +static struct timehands th3; > +static struct timehands th2 = { > + .th_next = &th3 > +}; > + > +static struct timehands th4; > +static struct timehands th3 = { > + .th_next = &th4 > +}; > + > +static struct timehands th5; > +static struct timehands th4 = { > + .th_next = &th5 > +}; > + > +static struct timehands th6; > +static struct timehands th5 = { > + .th_next = &th6 > +}; > + > +static struct timehands th7; > +static struct timehands th6 = { > + .th_next = &th7 > +}; > + > +static struct timehands th8; > +static struct timehands th7 = { > + .th_next = &th8 > +}; > + > +static struct timehands th9; > +static struct timehands th8 = { > + .th_next = &th9 > +}; > + > +static struct timehands th0; > +static struct timehands th9 = { > .th_next = &th0 > }; > static struct timehands th0 = { > Oh, I'm sorry, I forgot to respond about this. Yeah, that patch would do it. I think a minimum of 4 sets of timehands are needed for pps capture on a single-core system with a latching timecounter like dmtpps. -- Ian From owner-freebsd-usb@freebsd.org Mon Aug 19 14:32:29 2019 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF07FC841E for ; Mon, 19 Aug 2019 14:32:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 46BxGP3dPMz3Pmr for ; Mon, 19 Aug 2019 14:32:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.nyi.freebsd.org (Postfix) id 7C8F2C841D; Mon, 19 Aug 2019 14:32:29 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C562C841C for ; Mon, 19 Aug 2019 14:32:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46BxGM4zh1z3Pmh for ; Mon, 19 Aug 2019 14:32:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x831.google.com with SMTP id k13so2069178qtm.12 for ; Mon, 19 Aug 2019 07:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YJ5VLjHDvS5lMHvLDxXuoV6qN0OIhFuG04wYGF2nOf0=; b=Qy7YQEkF9+SfqzO+SNpQdwCd+/umaBobHdS8oPaFh+gfpyXuzGtOqb2JyGOaaK7W/Q 9urSGI1NzrMdxfH96BrNJl/6W0kFnWysQOoPWRgk3ChZbUrYJ5KHrT2bljHdqMJS58hS IIo5L6Srv9YDk2DXL9fCy5shoYALt+rj8HhsszTy5dX4CgFqY2tmW88Qt736tNCLlqh/ y2qej4UP9DJoZMGe5odAJ/1Updu9QA5KmG1nPQFFAkLPLtx1oa6i3HmzFVMTiDs0r1Eh jBXis3eJDYhOimam6RzJXer8yix1PepOd7dSM2aip6fM99XxKkUFinkcuoUWUKshf89E sXCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YJ5VLjHDvS5lMHvLDxXuoV6qN0OIhFuG04wYGF2nOf0=; b=CV1di2rw6AIcaNnISr61c1LaKWnua7gdrAoJfzJ56SKlrlwp1R1V7zLiNvCk4vKRh5 pID11przydECn08PHdmDo2rkyWviwL8GuDdJhDyvXFZ0EYGJ9HPNORwKS5C2mZp2G80n kbVmbalfkZZyK22XvMiaJj3lnlKka7l3c40kQc7L3mI6Ls5ZVsUlYNbvVA6oBMFo30/Z rMrCYehBLEWsCFD/hjfKCT2shJ3VD3bSyZFl8Risjri1oeqoDZfww2H3ex0FKpY8j1Gs nSJ6h5weilxSWxnko+QRfMbKHegnIPJc4vQ0lOSLC6OERMCSs1J6Xm7VgJv19b8kS61t J+9g== X-Gm-Message-State: APjAAAUiqEIc+2HZTr31IoNJXrhs+LOSLB7YzV/JvK3AsOywbGDsvEWE zIV22nJ0Ap+YDCHSqggoOUCX6c961Fl8oneDaXrDz1rMgvE= X-Google-Smtp-Source: APXvYqydrxtofOhGYdwUYtSXvQiF5mH3GSCf+S0/DKGl9aH4kyAK2iSDmH2xRX646FzhYDhWi6tW8tWmZdwWhsJNcz0= X-Received: by 2002:a0c:e5c6:: with SMTP id u6mr10984000qvm.102.1566225146359; Mon, 19 Aug 2019 07:32:26 -0700 (PDT) MIME-Version: 1.0 References: <61B1AAF3-40F6-47BC-8F05-7491C13BF288@dons.net.au> <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> In-Reply-To: From: Warner Losh Date: Mon, 19 Aug 2019 08:32:15 -0600 Message-ID: Subject: Re: Is it a good idea to use a usb-serial adapter for PPS input? Yes, it is. To: Ian Lepore Cc: "O'Connor, Daniel" , "usb@freebsd.org" , "freebsd-arm@FreeBSD.org" X-Rspamd-Queue-Id: 46BxGM4zh1z3Pmh X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Qy7YQEkF; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::831) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-5.94 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[usb@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; RCVD_IN_DNSWL_NONE(0.00)[1.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.94)[ip: (-9.36), ipnet: 2607:f8b0::/32(-2.93), asn: 15169(-2.37), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; SUBJECT_HAS_QUESTION(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2019 14:32:29 -0000 On Mon, Aug 19, 2019 at 8:26 AM Ian Lepore wrote: > On Mon, 2019-08-19 at 17:09 +0930, O'Connor, Daniel wrote: > > > On 12 Aug 2019, at 09:09, O'Connor, Daniel > > > wrote: > > > > always get lost on single-core processors which are in cpu_idle() > > > > at > > > > the time the hardclock interrupt happens. (But that's fixable by > > > > just > > > > increasing the number of timehands, I think at least 4 are > > > > required.) > > > > > > OK, how do I increase the number of clock hands? > > > > I am going to try this diff but buildkernel is going to take a > > while... > > > > diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c > > index 2656fb4d2..00440b6a2 100644 > > --- a/sys/kern/kern_tc.c > > +++ b/sys/kern/kern_tc.c > > @@ -83,8 +83,48 @@ struct timehands { > > struct timehands *th_next; > > }; > > > > -static struct timehands th0; > > +static struct timehands th2; > > static struct timehands th1 = { > > + .th_next = &th2 > > +}; > > + > > +static struct timehands th3; > > +static struct timehands th2 = { > > + .th_next = &th3 > > +}; > > + > > +static struct timehands th4; > > +static struct timehands th3 = { > > + .th_next = &th4 > > +}; > > + > > +static struct timehands th5; > > +static struct timehands th4 = { > > + .th_next = &th5 > > +}; > > + > > +static struct timehands th6; > > +static struct timehands th5 = { > > + .th_next = &th6 > > +}; > > + > > +static struct timehands th7; > > +static struct timehands th6 = { > > + .th_next = &th7 > > +}; > > + > > +static struct timehands th8; > > +static struct timehands th7 = { > > + .th_next = &th8 > > +}; > > + > > +static struct timehands th9; > > +static struct timehands th8 = { > > + .th_next = &th9 > > +}; > > + > > +static struct timehands th0; > > +static struct timehands th9 = { > > .th_next = &th0 > > }; > > static struct timehands th0 = { > > > > Oh, I'm sorry, I forgot to respond about this. Yeah, that patch would > do it. I think a minimum of 4 sets of timehands are needed for pps > capture on a single-core system with a latching timecounter like > dmtpps. > Do we have a good (or even a bad) writeup of how to know that 4 is good, or when 5 or 6 might be needed? Warner From owner-freebsd-usb@freebsd.org Tue Aug 20 02:31:14 2019 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51175C1538 for ; Tue, 20 Aug 2019 02:31:14 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 46CFCj6sytz3H6D for ; Tue, 20 Aug 2019 02:31:13 +0000 (UTC) (envelope-from darius@dons.net.au) Received: by mailman.nyi.freebsd.org (Postfix) id E9F53C1532; Tue, 20 Aug 2019 02:31:13 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9BCDC1530 for ; Tue, 20 Aug 2019 02:31:13 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 46CFCj1Zytz3H6B for ; Tue, 20 Aug 2019 02:31:12 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp118-210-70-93.adl-adc-lon-bras32.tpg.internode.on.net (HELO midget.dons.net.au) ([118.210.70.93]) by ipmail06.adl2.internode.on.net with ESMTP; 20 Aug 2019 12:01:08 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x7K2V0OS020763 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 20 Aug 2019 12:01:04 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x7K285Ou002459 for ; Tue, 20 Aug 2019 11:38:05 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [203.31.81.177] ([203.31.81.177]) by ppp118-210-70-93.adl-adc-lon-bras32.tpg.internode.on.net (envelope-sender ) (MIMEDefang) with ESMTP id x7K27xlJ002453; Tue, 20 Aug 2019 11:38:05 +0930 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Is it a good idea to use a usb-serial adapter for PPS input? Yes, it is. From: "O'Connor, Daniel" In-Reply-To: <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> Date: Tue, 20 Aug 2019 11:37:59 +0930 Cc: "usb@freebsd.org" , "freebsd-arm@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9D2ACA87-C2DB-40D9-9638-B0E215A4EEC0@dons.net.au> References: <61B1AAF3-40F6-47BC-8F05-7491C13BF288@dons.net.au> <9E142F1A-5E8C-4410-91F5-7C80B3D0A15B@dons.net.au> To: Ian Lepore X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=HELO_MISC_IP, RDNS_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 46CFCj1Zytz3H6B X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of darius@dons.net.au has no SPF policy when checking 150.101.137.129) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [6.52 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(2.11)[ip: (5.31), ipnet: 150.101.0.0/16(3.58), asn: 4739(1.63), country: AU(0.01)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.94)[0.938,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[usb@freebsd.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.98)[0.981,0]; DMARC_NA(0.00)[dons.net.au]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; RCVD_IN_DNSWL_NONE(0.00)[129.137.101.150.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[] X-Spam: Yes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2019 02:31:14 -0000 > On 19 Aug 2019, at 17:09, O'Connor, Daniel wrote: > I am going to try this diff but buildkernel is going to take a = while... Was a lot faster cross building, so I installed it this morning: [gps 1:56] ~ >uname -a FreeBSD gps 13.0-CURRENT FreeBSD 13.0-CURRENT #1 = 41a4c010326-c262109(master)-dirty: Tue Aug 20 11:04:57 ACST 2019 = darius@midget.dons.net.au:/usr/obj/arm-src/arm.armv7/sys/GENERIC arm [gps 1:57] ~ >dmesg|grep pps am335x_dmtpps0: mem 0x48044000-0x480443ff = irq 30 on simplebus0 [gps 1:58] ~ >ll /dev/pps0 /dev/dmtpps crw-rw---- 1 root ntpd 0x41 20 Aug 01:09 /dev/dmtpps lrwxr-xr-x 1 root wheel 6 20 Aug 01:09 /dev/pps0 -> dmtpps [gps 1:58] ~ >cat /etc/ntp.conf server 10.0.2.1 iburst prefer server 127.127.22.0 minpoll 4 maxpoll 4 fudge 127.127.22.0 refid PPS [gps 1:59] ~ >ntpq -nc pe remote refid st t when poll reach delay offset = jitter = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D *10.0.2.1 214.52.129.40 3 u 64 64 37 0.349 -0.631 = 0.299 o127.127.22.0 .PPS. 0 l 13 16 377 0.000 1.000 = 0.106 It certainly seems happier with the PPS than it was before. Next up would be to use the NMEA coming from the GPS engine for time = instead of using the LAN host so it's self contained. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum