Merge branch 'v4.4/topic/mm-kaslr' into v4.4/topic/mm-kaslr-pax_usercopy
[firefly-linux-kernel-4.4.55.git] / include / linux / jiffies.h
index 9ea50da7351351e6165326687ac959ab09a52cac..5fdc55312334fe68145c1c9e4decb29dd539e7b5 100644 (file)
@@ -409,9 +409,25 @@ static __always_inline unsigned long usecs_to_jiffies(const unsigned int u)
        }
 }
 
-extern unsigned long timespec_to_jiffies(const struct timespec *value);
-extern void jiffies_to_timespec(const unsigned long jiffies,
-                               struct timespec *value);
+extern unsigned long timespec64_to_jiffies(const struct timespec64 *value);
+extern void jiffies_to_timespec64(const unsigned long jiffies,
+                                 struct timespec64 *value);
+static inline unsigned long timespec_to_jiffies(const struct timespec *value)
+{
+       struct timespec64 ts = timespec_to_timespec64(*value);
+
+       return timespec64_to_jiffies(&ts);
+}
+
+static inline void jiffies_to_timespec(const unsigned long jiffies,
+                                      struct timespec *value)
+{
+       struct timespec64 ts;
+
+       jiffies_to_timespec64(jiffies, &ts);
+       *value = timespec64_to_timespec(ts);
+}
+
 extern unsigned long timeval_to_jiffies(const struct timeval *value);
 extern void jiffies_to_timeval(const unsigned long jiffies,
                               struct timeval *value);