From nobody Mon Feb 27 22:12:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PQZVX5wv6z3tDhl; Mon, 27 Feb 2023 22:12:20 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQZVX5N6Rz3QG9; Mon, 27 Feb 2023 22:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677535940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lOQ+2nfA8dQ8X4lUrt7vl+Orp+zL1ILp9SZh+gs837w=; b=GztOiDfR1S9XF+pJkPoc6LJeEMvP0p9CU6BUE5z1tS5LEzDyogDEs0rQzKRmHyNrSUfjeT zZ6M3vqVDFgtWnNWHy/K8++u9KftUh8h0KNGob7ROzKSoVzp/0KHs+NL9PvpSC2WY1w23+ OecGPWglqf+a1Fux7YfMNBoanmWryXsBbNTw1w0Gd/nYf84q97M/yM7FOuaztxsFg6LRTD asXkPNSYgnesyH2mQQpApKvmv8oh/v4kN7ioVhR4koVDW30EGw2/fdbix097YsTZjeHW8F tFqBohjYzC5AaTFs/mTdzl6mnNKUfyuj+31bC0GfEf9o4NL8fjdACRPOFrmyVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677535940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lOQ+2nfA8dQ8X4lUrt7vl+Orp+zL1ILp9SZh+gs837w=; b=fBvHhFgIOI9GjWvxdAkll1OgYk3aTlad2a96ZBZdL38VekMNI972+F0ovMnRsgT2+Z4kui gv6bKwXBTmneYMI7CAjsPxhTA1yvunOA21ffygtFGp9ekzDJ7SD1nzSiSHKtEfkDhWYO7L 5prQijvp3Jvu2vCPC0SAToXe/SklGeILjarkNXnVFFTgumNHmkE5q/zRmyIn+sXC6Tcjwo 27hln5zlMMhrKuTVaZsWeESippUlRceOk+yqgyVpaC6n95yZsEW2Zsg5xUbfPB5NQ9Wul6 DKEKXUm80utj5GPvpNgWo6DJ/VWq6L4rJCbnYB8w/Ic8k6rKYS+vqPvybigjWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677535940; a=rsa-sha256; cv=none; b=m+KdzFUKFWPdcGYEfcIaEsMllstLfMRgZN1pQP7eNl64536aOiDdx5P7LwklVfhuadtpxl waNqw/usroLuo/XJCztbt6+AFQ3oO7n8mKWUbXasnBWj6kCTd+aUDKGC5dK0MD2YgnGlxF ZXElKWghjYlbBldEGpOB0GFoebqJCVCK7PZHWJzOTCE104U5ilM9UqmSJTt/0ZA7SRk0/7 +TfYKEJ2H0pGXbzrYd2vLD7yLCVVszleP+OeOgAqhrkE1sueWoAnjiY1OM6cWQAFYqywoZ xOvfuvCXA3PgXVF79OAq71EDZJ+ZRr5LjNxmL57VZ1XsJerDPvU+KK8Hw7v54A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PQZVX4THHzj25; Mon, 27 Feb 2023 22:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31RMCKdX028819; Mon, 27 Feb 2023 22:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31RMCK9e028818; Mon, 27 Feb 2023 22:12:20 GMT (envelope-from git) Date: Mon, 27 Feb 2023 22:12:20 GMT Message-Id: <202302272212.31RMCK9e028818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0448501f2b1a - main - pps: Move pcount assignment in pps_event() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0448501f2b1a2c89be4042817939645ec6fddfd8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0448501f2b1a2c89be4042817939645ec6fddfd8 commit 0448501f2b1a2c89be4042817939645ec6fddfd8 Author: Sebastian Huber AuthorDate: 2023-02-27 21:49:09 +0000 Commit: Warner Losh CommitDate: 2023-02-27 22:10:55 +0000 pps: Move pcount assignment in pps_event() Move the pseq increment. This makes it possible to reuse registers earlier. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/604 --- sys/kern/kern_tc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index b466fd4399e4..b625726123af 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1842,25 +1842,25 @@ pps_event(struct pps_state *pps, int event) #endif } + *pcount = pps->capcount; + /* * If the timecounter changed, we cannot compare the count values, so * we have to drop the rest of the PPS-stuff until the next event. */ if (__predict_false(pps->ppstc != captc)) { pps->ppstc = captc; - *pcount = pps->capcount; pps->ppscount[2] = pps->capcount; return; } + (*pseq)++; + /* Convert the count to a timespec. */ tcount = pps->capcount - tcount; tcount &= captc->tc_counter_mask; bintime_addx(&bt, capth_scale * tcount); bintime2timespec(&bt, &ts); - - *pcount = pps->capcount; - (*pseq)++; *tsp = ts; if (foff) {