From nobody Wed Mar 08 23:12:40 2023 X-Original-To: dev-commits-src-main@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 4PX7Q058Skz3x1bK; Wed, 8 Mar 2023 23:12:40 +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 4PX7Q04gdwz3C4Y; Wed, 8 Mar 2023 23:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678317160; 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=FrPr0dp+rg541YKkcsBlCRO4Rocyiiz6V6iUJxkXldc=; b=Ug0hUXu+mNhcoZEy1QxGPpypcrrO2SwCC3wegutnCspF4h/foIZnDnBlU304dZw0tUPp1B RdWbyb7WxpnEPyPxkPa9gFONd5kMKHQYfZH8wr0j8PAIMApDA8akNCjBIfeGmSkdN0GGQN gIkfBu6C2ViuyZhM/gdVq/3QJZFUjqzNmm68EvMsppsa2mNx+oaufLaOpTQHSKR6EMLzr3 LmJphq0PW8zjSF7nJtC+ioogczQ7r2eP8+BZdX1Yi8e9b7oaKnpQnqVVVODyBQK74xAjRw 5MSmW/S7a8Ngb09i1HzMljPBXY417Kjea0Zio0ucy44J0AS0ePJc8IRTvlz5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678317160; 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=FrPr0dp+rg541YKkcsBlCRO4Rocyiiz6V6iUJxkXldc=; b=ICcJl4f0L3InioNYD6TrpWhqqGjkU29Tde6WdQ18+UdrvylSN9clTbQfkTxR0vnEJXmeTx k9atIKTZz9N5nzJVdn3U+eL7ktOGUpoH76iNNnAv6+u9fp68pzzX6JNXBfaFs0ZviKF7h/ dh7YSTxyN/ubvUEXNWNcRoIgsYTPj6Gag97YOIfqDUS199KMMimh9+OM7Q3Hw5cO3R2BeX XVai8VU1ZaoVtUadN1uYEaKz1LnVr/7uTZG5y0wYFS1Ff23Td0bID0nuiK4MkScXGlm7Qx 4Amhjov9el4p0KqoX4p/jZ2En4ASx4X+E/EvAMqxgMzsSrxQz7zQJwXnlcCdgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678317160; a=rsa-sha256; cv=none; b=DzCBWeZRr0/i6Tq+Hzxg2DkQsvNbsS3gyMz+Pw3ia1r9mid3t08aOQ6fom+ST7pSio8J9M 51hL3bJ+jywCSbBfjGWRLI5bGXgKx6swYTijzGFmrhB8YN8tT+6IbyuppyvbIXAaqxra1v hmFMo6WzwyrW9xtTWvzJapL28XpAEJuVAxsnvD3oKLgC3a/UR4FpQxBcCMUvnMxFA6E7js rQf7oD+xHM2ElRkm9HSKXCw0inPd1e+yeeIJ0JK4XsIy364AU0zBShWfxq6SAwiXjbrO/U uE95MCBp3rgLWK0S/FTNJPblHNYO1sfpmXcxr7ZRDmJmHo3VczldCS2PJJz/cw== 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 4PX7Q03d1Hzl2k; Wed, 8 Mar 2023 23:12:40 +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 328NCexJ018919; Wed, 8 Mar 2023 23:12:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 328NCeQg018918; Wed, 8 Mar 2023 23:12:40 GMT (envelope-from git) Date: Wed, 8 Mar 2023 23:12:40 GMT Message-Id: <202303082312.328NCeQg018918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f4ea84cea23f - main - krping: Use get_cyclecount for get_cycles. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4ea84cea23fa8e6094f629cc3e4b1c39bd7bf34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f4ea84cea23fa8e6094f629cc3e4b1c39bd7bf34 commit f4ea84cea23fa8e6094f629cc3e4b1c39bd7bf34 Author: John Baldwin AuthorDate: 2023-03-08 23:06:59 +0000 Commit: John Baldwin CommitDate: 2023-03-08 23:06:59 +0000 krping: Use get_cyclecount for get_cycles. This avoids having to duplicate identical MD code. Reviewed by: np, emaste Differential Revision: https://reviews.freebsd.org/D38971 --- sys/contrib/rdma/krping/krping.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c index 98f129597464..fe8ff9ed9243 100644 --- a/sys/contrib/rdma/krping/krping.c +++ b/sys/contrib/rdma/krping/krping.c @@ -69,13 +69,7 @@ MODULE_DEPEND(krping, linuxkpi, 1, 1, 1); static __inline uint64_t get_cycles(void) { -#if defined(__amd64__) || defined(__i386__) - uint32_t low, high; - __asm __volatile("rdtsc" : "=a" (low), "=d" (high)); - return (low | ((u_int64_t)high << 32)); -#elif defined(__powerpc64__) - return __builtin_readcyclecounter(); -#endif + return (get_cyclecount()); } typedef uint64_t cycles_t;