From nobody Mon Jul 11 21:30:17 2022 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 B79B61CFF567; Mon, 11 Jul 2022 21:30:17 +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 4LhcVd4rZdz3xBq; Mon, 11 Jul 2022 21:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657575017; 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=tSFnirEjXFHqJgQTKcwJ1s2AVBKJWvSROyVQxk0fi9c=; b=WVbpt1FO3PHc0slxO4ASwYICPyZtmg1FbmdBcMEQd9YvvLzO988926NRDxrsWV4LSBJF8n taIj066Ywwe/13GQArAKNKsx5WXbInFlx1F3XRa7tnbLWvk6WzTGgrNHclh5RBLGw6H5lQ YFHfXL7B1K+wFqVbgyOeh37s4Ylr5dcE94tkGwW+vUzZb0Hs1vB9+pjpG3seMoM2Yj1vpl k+QE+tD46QUhA75rKgpiv+jWSA9AKGv/h865nnGXaYHtvCWwITNQn/fr7tit5kJg1mZDy3 yrupqw0EDhiapzJOPNf2bTtDexGHiGN34nQUsGPGj6Mfq0SZ1dex+Lwy9pgkUA== 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 4LhcVd3y30zJpr; Mon, 11 Jul 2022 21:30:17 +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 26BLUHSq031284; Mon, 11 Jul 2022 21:30:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BLUHJP031282; Mon, 11 Jul 2022 21:30:17 GMT (envelope-from git) Date: Mon, 11 Jul 2022 21:30:17 GMT Message-Id: <202207112130.26BLUHJP031282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: f8da86347070 - stable/13 - linux(4): Implement __vdso_time 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f8da86347070ce4b6c39a8d6ba2df53e49ec4f84 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657575017; 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=tSFnirEjXFHqJgQTKcwJ1s2AVBKJWvSROyVQxk0fi9c=; b=Nz/zikSn8RgWOqZe1HbSI4tVqcc0BDUwaBm40GrX2k8WmOq5cH5SZemPiJX3rtlYoYm4vx yByCPOA3oOkPGiqBs3FW6kh7ztQv+iZ3yzORrYoTDPSAOyUglXKLuHyI+AZbG3LZQRJG4c 3SDZA/gfi5474VO/HlaeHtYTT/k0Kwmqwm5I+yruGBa0TcRLQ3/hRSDOZGJDJ/tJrLySvY 9uUNzmPsmLvqH+fx4eQH46isQe0rKxbCdWu6AGvGBUKPw6MtwCrxs9pu/is3BTx57vHX+6 mU1/90dyWKd8UZj8dCRhGNX1iwVRaX9NazZ57V234P5MVnA1dxwbhHA4pp98gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657575017; a=rsa-sha256; cv=none; b=S6K5BnpehOqoUU2Dh71vousOCbEwBB8bhX4pSXkdeNUu3hFu13Yzv9HzFGkoM2g2sVuzBx O5fKgS09rRLeGd/vSfa8AS/dFru/uhyZlLHDWgDiV1PZGEYvfCPQy5WCiyy7vwJKgdFboX +fmgugxpmunpfpCeGIBILqNhL3IBYhwktpBkC2qqQqHItzlvlq6i3bRTV19+m+k136CqQl 87Z1WOpVh8ov2FyhyujecJAcJytssAnVG1gXqg3mSZBOBFl6OQADKAuyPXDLg2OHjIxLqs VTs+W2l9eYkISZsaCVIkJmTKmmlH3Ix6K3BW4Juy4gC7tSRgIyKeDnvSDAOhMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f8da86347070ce4b6c39a8d6ba2df53e49ec4f84 commit f8da86347070ce4b6c39a8d6ba2df53e49ec4f84 Author: Dmitry Chagin AuthorDate: 2022-07-04 20:41:32 +0000 Commit: Dmitry Chagin CommitDate: 2022-07-11 21:28:28 +0000 linux(4): Implement __vdso_time PR: 240769 MFC after: 3 days (cherry picked from commit 42317e642645b36e711b5dd560d06a303a492e0f) --- sys/compat/linux/linux_vdso_gtod.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_vdso_gtod.inc b/sys/compat/linux/linux_vdso_gtod.inc index f101fe81f7f8..8a3840edd87d 100644 --- a/sys/compat/linux/linux_vdso_gtod.inc +++ b/sys/compat/linux/linux_vdso_gtod.inc @@ -372,7 +372,14 @@ __vdso_getcpu(uint32_t *cpu, uint32_t *node, void *cache) int __vdso_time(long *tm) { + struct timeval tv; + int error; - return (__vdso_time_fallback(tm)); + error = freebsd_gettimeofday(&tv, NULL); + if (error != 0) + return (__vdso_time_fallback(tm)); + if (tm != NULL) + *tm = tv.tv_sec; + return (tv.tv_sec); } #endif