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