All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] backports: add ktime_get_boot_ns()
@ 2015-12-02  8:56 Johannes Berg
  2015-12-02  9:03 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2015-12-02  8:56 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

This small helper inline was added in 3.17, we want to use it now
so need to backport it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/timekeeping.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h
index fe42e7170680..4d31580b8757 100644
--- a/backport/backport-include/linux/timekeeping.h
+++ b/backport/backport-include/linux/timekeeping.h
@@ -2,6 +2,7 @@
 #define __BACKPORT_TIMKEEPING_H
 #include <linux/version.h>
 #include <linux/types.h>
+#include <linux/hrtimer.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
 #include_next <linux/timekeeping.h>
@@ -15,6 +16,11 @@ static inline u64 ktime_get_ns(void)
 {
 	return ktime_to_ns(ktime_get());
 }
+
+static inline u64 ktime_get_boot_ns(void)
+{
+	return ktime_to_ns(ktime_get_boottime());
+}
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
-- 
2.6.2

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-07 12:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02  8:56 [PATCH v2] backports: add ktime_get_boot_ns() Johannes Berg
2015-12-02  9:03 ` Johannes Berg
2015-12-02  9:04   ` Johannes Berg
2015-12-02 10:33     ` Arend van Spriel
2015-12-02 10:46       ` Johannes Berg
2015-12-04 21:14         ` Hauke Mehrtens
2015-12-04 21:25           ` Hauke Mehrtens
2015-12-07 12:51           ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.