Backports Archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: backports@vger.kernel.org
Cc: john@phrozen.org
Subject: [PATCH 4/6] backport-include: backport ktime_get_boottime_seconds
Date: Thu,  6 Sep 2018 08:57:48 +0200	[thread overview]
Message-ID: <20180906065750.89673-4-nbd@nbd.name> (raw)
In-Reply-To: <20180906065750.89673-1-nbd@nbd.name>

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 backport/backport-include/linux/timekeeping.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h
index 30f9b7a9..56c3deec 100644
--- a/backport/backport-include/linux/timekeeping.h
+++ b/backport/backport-include/linux/timekeeping.h
@@ -24,6 +24,13 @@ static inline u64 ktime_get_boot_ns(void)
 }
 #endif /* < 3.17 */
 
+#if LINUX_VERSION_IS_LESS(4,18,0)
+static inline time64_t ktime_get_boottime_seconds(void)
+{
+	return ktime_divns(ktime_get_boottime(), NSEC_PER_SEC);
+}
+#endif /* < 4.18 */
+
 #if LINUX_VERSION_IS_LESS(3,19,0)
 static inline time64_t ktime_get_seconds(void)
 {
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2018-09-06 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  6:57 [PATCH 1/6] backports: copy linux/overflow.h Felix Fietkau
2018-09-06  6:57 ` [PATCH 2/6] backport-include: backport kvmalloc and kvmalloc_array Felix Fietkau
2018-09-06  6:57 ` [PATCH 3/6] patches: remove lib-bucket_locks.patch Felix Fietkau
2018-09-06  6:57 ` Felix Fietkau [this message]
2018-09-06  6:57 ` [PATCH 5/6] backport: copy net/rsi_91x.h Felix Fietkau
2018-09-06  6:57 ` [PATCH 6/6] backport: add firmware_request_nowarn and firmware_request_cache Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180906065750.89673-4-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=backports@vger.kernel.org \
    --cc=john@phrozen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).