aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/jiffies.h6
-rw-r--r--kernel/sched/core.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index d235e88cfd7c..1f44466c1e9d 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -294,6 +294,12 @@ extern unsigned long preset_lpj;
294 */ 294 */
295extern unsigned int jiffies_to_msecs(const unsigned long j); 295extern unsigned int jiffies_to_msecs(const unsigned long j);
296extern unsigned int jiffies_to_usecs(const unsigned long j); 296extern unsigned int jiffies_to_usecs(const unsigned long j);
297
298static inline u64 jiffies_to_nsecs(const unsigned long j)
299{
300 return (u64)jiffies_to_usecs(j) * NSEC_PER_USEC;
301}
302
297extern unsigned long msecs_to_jiffies(const unsigned int m); 303extern unsigned long msecs_to_jiffies(const unsigned int m);
298extern unsigned long usecs_to_jiffies(const unsigned int u); 304extern unsigned long usecs_to_jiffies(const unsigned int u);
299extern unsigned long timespec_to_jiffies(const struct timespec *value); 305extern unsigned long timespec_to_jiffies(const struct timespec *value);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a88f4a485c5e..61e601fc2b1e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2325,7 +2325,7 @@ u64 scheduler_tick_max_deferment(void)
2325 if (time_before_eq(next, now)) 2325 if (time_before_eq(next, now))
2326 return 0; 2326 return 0;
2327 2327
2328 return jiffies_to_usecs(next - now) * NSEC_PER_USEC; 2328 return jiffies_to_nsecs(next - now);
2329} 2329}
2330#endif 2330#endif
2331 2331