diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-09-20 14:28:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-24 09:28:51 +0200 |
commit | 0782ee3bd8a245d70696ca2b0f0733a980c62764 (patch) | |
tree | 70a4798ba9c5f9f74731989858a612fdbe62fee8 /backport/backport-include | |
parent | 52d3cfdb17e639a9b9e5e13b08d5a2e14d72509b (diff) |
backport: make ktime_get_boottime_seconds() non-inline
With kernels < 3.17, we need to include hrtimer.h to get ktime_divns()
for the ktime_get_boottime_seconds() backport. But we can't just
include htrtimer.h in the backport timekeeping.h because we run into
some cyclical inclusions that cause problems. To solve that make
ktime_get_boottime_seconds() non-inline and add it to a new
backport-4.18.c file.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include')
-rw-r--r-- | backport/backport-include/linux/timekeeping.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 73ce9f17..aebb00ca 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -25,10 +25,7 @@ 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); -} +extern time64_t ktime_get_boottime_seconds(void); #endif /* < 4.18 */ #if LINUX_VERSION_IS_LESS(3,19,0) |