summaryrefslogtreecommitdiff
path: root/include/linux/jiffies.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-31 21:02:51 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-31 21:02:51 +0400
commitaafd9d6a46745926648cb5d0b68b108e79ceb8d4 (patch)
treeb099dece2ff08e57d141af686ffbb24dc663c05b /include/linux/jiffies.h
parent595bf999e3a864f40e049c67c42ecee50fb7a78a (diff)
parenta2b4c607c93a0850c8e3d90688cf3bd08576b986 (diff)
downloadlinux-aafd9d6a46745926648cb5d0b68b108e79ceb8d4.tar.xz
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer/dynticks updates from Ingo Molnar: "This tree contains misc dynticks updates: a fix and three cleanups" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/nohz: Fix overflow error in scheduler_tick_max_deferment() nohz_full: fix code style issue of tick_nohz_full_stop_tick nohz: Get timekeeping max deferment outside jiffies_lock tick: Rename tick_check_idle() to tick_irq_enter()
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r--include/linux/jiffies.h6
1 files changed, 6 insertions, 0 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;
*/
extern unsigned int jiffies_to_msecs(const unsigned long j);
extern unsigned int jiffies_to_usecs(const unsigned long j);
+
+static inline u64 jiffies_to_nsecs(const unsigned long j)
+{
+ return (u64)jiffies_to_usecs(j) * NSEC_PER_USEC;
+}
+
extern unsigned long msecs_to_jiffies(const unsigned int m);
extern unsigned long usecs_to_jiffies(const unsigned int u);
extern unsigned long timespec_to_jiffies(const struct timespec *value);