[PATCH] mm: split highorder pages
[firefly-linux-kernel-4.4.55.git] / include / linux / timex.h
index 7e050a2cc35be69f2685309ff9c445adbba8ae68..b7ca1204e42ac6efedc5ad6a5fd78dfb8e67c549 100644 (file)
@@ -282,6 +282,13 @@ static inline int ntp_synced(void)
        return !(time_status & STA_UNSYNC);
 }
 
+/* Required to safely shift negative values */
+#define shift_right(x, s) ({   \
+       __typeof__(x) __x = (x);        \
+       __typeof__(s) __s = (s);        \
+       __x < 0 ? -(-__x >> __s) : __x >> __s;  \
+})
+
 
 #ifdef CONFIG_TIME_INTERPOLATION
 
@@ -338,6 +345,9 @@ time_interpolator_reset(void)
 
 #endif /* !CONFIG_TIME_INTERPOLATION */
 
+/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
+extern u64 current_tick_length(void);
+
 #endif /* KERNEL */
 
 #endif /* LINUX_TIMEX_H */