From nobody Sun Dec 24 08:23:06 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 4SyYvH1ycvz54HPy; Sun, 24 Dec 2023 08:23:07 +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 4SyYvG6VPqz4Xrm; Sun, 24 Dec 2023 08:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703406186; 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=JprcfZLoP4KayGQvE8Q+rfX4VQTvHOwe1yUK+A9+oEA=; b=i7X4tIq4I97wVTnogazRe1FCcd4pVKnQcBnkn/PTtMGQV+vWOY+XY5/gOOjmsi1vT1B4JK aPZ3+G9bMAkkpcB/yQbIx/JEPakSUgtSBFOs//paNJCUqJEqoaqm8/vLFoseZo6HOkXDQM 1H8Cyy/qX6WEJ/MeqTp7Am8m9q90nPsGRWixJrj2leNlDS/8Qqc6RbRa8gF9CV82MS1tj6 A4BNIChptkSk6OC7x7aaB4sHXMXZSu6yOEgs0XzrVOONIRrE39SlqlcH5/mhLWtuw5B/kQ tSgpFBuHtn8jpKVM/GW8g0HgBF5CekU+QGk3sSthBhddAy99gdzrznV96BiRUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703406186; a=rsa-sha256; cv=none; b=MpvqtE2vm74KIKjHCXM+ZsijxT3bvDgUvzm+ard1N5pcl8Na3eHcZjLS+hBSc8utHG2KrF qBfpnX6apKy4OHozXyU1QrPkUqHjwlC/zxw3y7Fg7L9uv1jhY4GQQOQBoRxqUo2ESWYCMv DyaCbpYZVZzji1C7WZD3VCFN5IwSauRpVlMEryUshB9oo9CwQhJHgYORFz9gL2CETJ4jL8 iBu2VZ2u/3UpDGB/2MMusBnVETMYFGelcTTVndFrnCGzugwiWcqjBUMJMXz3sOLHhduQaD SaGLFf7OWatjyY+W3VbhBEcbgzWme0c5Y8h1Zupfce/KQoox0n4Plveete/ZoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703406186; 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=JprcfZLoP4KayGQvE8Q+rfX4VQTvHOwe1yUK+A9+oEA=; b=KgZjkFlkyHmjHHiVldxgJo0j+tFK7u/QwaJ1wOlZvKAV7UXeDprqFjD9Oc6hlTBnJ+l9qe u9Nwzqz568sdg7Fdktm1Rf0AeW1FTYDwIS/j48FhHAz5xS1lwVnfv6Smyjr3fkvXzD53Lx Q4lN367wKrrvcnmcFw7fcHpvvqq76O4RG2OTPqGQiZhqhS24zNsvLeGuyfy47G5PKCem2f EJ+kAlIh7Ct+/V99hnVWKC8vpLR6gr0rhmmduJx9XyPCQyyqEhB+/KbNWS/Gk98LR8fQk+ qnXPIiV8d8kfX9JO8cz99M6lduLMryomd5USLlOY0s1mw+f5MFxAz1g1uQfbXw== 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 4SyYvG5bs1z5tK; Sun, 24 Dec 2023 08:23:06 +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 3BO8N6OY087086; Sun, 24 Dec 2023 08:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BO8N65N087083; Sun, 24 Dec 2023 08:23:06 GMT (envelope-from git) Date: Sun, 24 Dec 2023 08:23:06 GMT Message-Id: <202312240823.3BO8N65N087083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: e964da141523 - main - 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/main X-Git-Reftype: branch X-Git-Commit: e964da141523e1eec2322082936cdb20ba0cf4a7 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e964da141523e1eec2322082936cdb20ba0cf4a7 commit e964da141523e1eec2322082936cdb20ba0cf4a7 Author: Vladimir Kondratyev AuthorDate: 2023-12-24 08:19:59 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-12-24 08:19:59 +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 --- 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 */