git: 93b82146c43b - main - LinuxKPI: add ktime_get_boottime_seconds()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 May 2025 19:46:02 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=93b82146c43b8ecad4fd7694ec1daf6d79cca65c commit 93b82146c43b8ecad4fd7694ec1daf6d79cca65c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-04-24 11:12:54 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-05-09 19:45:10 +0000 LinuxKPI: add ktime_get_boottime_seconds() ktime_get_boottime_seconds() is needed by an updated iwlwifi driver. Sposored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50005 --- sys/compat/linuxkpi/common/include/linux/ktime.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index 53c2abd64fc6..6a2f04f3d789 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -232,6 +232,13 @@ ktime_get_boottime_ns(void) return (ktime_to_ns(ktime_get_boottime())); } +static inline uint64_t +ktime_get_boottime_seconds(void) +{ + + return (ktime_divns(ktime_get_boottime(), NSEC_PER_SEC)); +} + static inline ktime_t ktime_get_real(void) {