From nobody Sat Feb 17 21:33:00 2024 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 4TchqK2GPPz59lCT; Sat, 17 Feb 2024 21:33:01 +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 4TchqJ6mc7z4hM9; Sat, 17 Feb 2024 21:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205581; 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=jvIDFqvZqkBUROTFzpNpPw9KXYppqZmQ2QwQS43GFc0=; b=qo+IvYFEZ0mBGYLsmJk1MNJ6foZ5sDJ8m1R4edf9IwqPy6C9ha2ga5NkVEU++0VbC5iyZo dVVxa6O1svNWxQiUd5Xs6Rzgpdo5knjfhhOw4dE8s3buarmu8Hn4W/0oy5s42O7hGNpzta 6nx82GUGO0m/3s8LxtBAEME8QUJj/qlGP+X9z0zbbWpEJFNRNsU56oqAgva3G2JdAJRUkt z09JUmHNej7FNsegEYAxUYvGtpedoNLHV0K3OvA/oY1Z1SYawlQEyUOG6CkTUhGLbeo1OW 48R8cch/DEZc3Ud5ui4QUcMB64JW52ugaslnzqLwewNjGR3HNRFINg1dzwDUIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205581; 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=jvIDFqvZqkBUROTFzpNpPw9KXYppqZmQ2QwQS43GFc0=; b=vtchO/S4nnv3dZVX4AmkYcN04QEunuA7asdj17tLlNYVNT34eV93nfyD6Jxl2nmu6y4r6G tbpzYqOU9k/PHm2mQTTDLDASUui1xpiDzCD2NetWn/3b87Mj0S7VR6YvSvj4JNLmmF1Wei 96y43LUDS7DCGw3WuhSUBcdTp9sGr3tKi+A0c8n5k+MQWkvwqzrbYi5/O3m3KKzO7ORteA jfe+nOKdP4D90UUngarfujl0yPJ/luzwKfXGuAUirg0N+SWD3fN6tItt2NkxqZWzmoUUWb t7PnpvqNPHQfCPdtwtsv++JwTQyjoMrnVO2k2du8Hd1zKAShM/cuz50gCbWv5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205581; a=rsa-sha256; cv=none; b=lSTq3dS9GUUX9NJwJQrg0XUi8eGmxYKN+G9UWVMAyaTWGQHUnDIrxvIw0/53YNYarkqtMd RXRy2rJsKMfH7odDaD1cEPrLLsc2/Ucoz7zQNhoSlzUr1gad5rSJhmaEeJYwNXZsZpVL0x Tt3dqKKZE34bB4Lg+B88OXZutrzrAjta3mtLF4QRmlQkq4KAPkCkxgtNtOa1+AB678+dJI RIss97/6liJtPnjjlJXjDUEalZguCwSoOQNCctp5Nv2K2MYFjvIblcTcj1WWs1TBWnS4q+ g3ynPKe0gseAvMQUuXTKwl9lrLPF6EGbZYoVtTM4k3TdAQaWrsVPzUNXV4B+ZA== 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 4TchqJ5ssJzPMG; Sat, 17 Feb 2024 21:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLX0Dt020815; Sat, 17 Feb 2024 21:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLX0UF020812; Sat, 17 Feb 2024 21:33:00 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:33:00 GMT Message-Id: <202402172133.41HLX0UF020812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: f3ce597171f0 - stable/14 - LinuxKPI: Add ktime_get_raw_fast_ns() to linux/ktime.h 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f3ce597171f0ed441f40df534555ee4493d6a728 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=f3ce597171f0ed441f40df534555ee4493d6a728 commit f3ce597171f0ed441f40df534555ee4493d6a728 Author: Vladimir Kondratyev AuthorDate: 2023-12-24 08:19:59 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:37 +0000 LinuxKPI: Add ktime_get_raw_fast_ns() to linux/ktime.h It is implemented like ktime_get_raw_ns() function but uses less precise getnanouptime() call. Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42804 (cherry picked from commit e964da141523e1eec2322082936cdb20ba0cf4a7) --- sys/compat/linuxkpi/common/include/linux/ktime.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index ae270d2ebd06..b13c7182bc61 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -262,4 +262,13 @@ ktime_get_raw_ns(void) return (ktime_to_ns(timespec_to_ktime(ts))); } +static inline uint64_t +ktime_get_raw_fast_ns(void) +{ + struct timespec ts; + + getnanouptime(&ts); + return (ktime_to_ns(timespec_to_ktime(ts))); +} + #endif /* _LINUXKPI_LINUX_KTIME_H */