aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/jiffies.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2014-10-09 20:44:01 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2015-07-29 09:44:57 -0400
commite075867681ca9b8c0b8823e24d0fb4ce3b4f2655 (patch)
treec5ab308aecc83571e3598565e9f2d1dd48dead72 /include/linux/jiffies.h
parentcbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff)
jiffies: Remove HZ > USEC_PER_SEC special case
HZ never goes much further 1000 and a bit. And if we ever reach one tick per microsecond, we might be having a problem. Lets stop maintaining this special case, just leave a paranoid check. Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Ingo Molnar <mingo@kernel.org> Cc; John Stultz <john.stultz@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r--include/linux/jiffies.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 535fd3bb1ba8..7c6febede6ba 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -363,18 +363,11 @@ static inline unsigned long msecs_to_jiffies(const unsigned int m)
363} 363}
364 364
365extern unsigned long __usecs_to_jiffies(const unsigned int u); 365extern unsigned long __usecs_to_jiffies(const unsigned int u);
366#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) 366#if !(USEC_PER_SEC % HZ)
367static inline unsigned long _usecs_to_jiffies(const unsigned int u) 367static inline unsigned long _usecs_to_jiffies(const unsigned int u)
368{ 368{
369 return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ); 369 return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ);
370} 370}
371#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
372static inline unsigned long _usecs_to_jiffies(const unsigned int u)
373{
374 return u * (HZ / USEC_PER_SEC);
375}
376static inline unsigned long _usecs_to_jiffies(const unsigned int u)
377{
378#else 371#else
379static inline unsigned long _usecs_to_jiffies(const unsigned int u) 372static inline unsigned long _usecs_to_jiffies(const unsigned int u)
380{ 373{