diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2017-03-07 10:55:34 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-03-07 11:03:28 +0100 |
commit | fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2 (patch) | |
tree | 616a9d40a03689da27bcee48a87b9dd237cfce39 /kernel | |
parent | 25b68a8f0ab13a98de02650208ec927796659898 (diff) | |
download | linux-stable-fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2.tar.gz linux-stable-fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2.tar.bz2 linux-stable-fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2.zip |
jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC
commit 93825f2ec736 converted NSEC_PER_SEC to TICK_NSEC because the author
confused NSEC_PER_JIFFY with NSEC_PER_SEC.
As a result, the calculation of refined jiffies got broken, triggering
lockups.
Fixes: 93825f2ec736 ("jiffies: Reuse TICK_NSEC instead of NSEC_PER_JIFFY")
Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1488880534-3777-1-git-send-email-fweisbec@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/jiffies.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c index 7906b3f0c41a..497719127bf9 100644 --- a/kernel/time/jiffies.c +++ b/kernel/time/jiffies.c @@ -125,7 +125,7 @@ int register_refined_jiffies(long cycles_per_second) shift_hz += cycles_per_tick/2; do_div(shift_hz, cycles_per_tick); /* Calculate nsec_per_tick using shift_hz */ - nsec_per_tick = (u64)TICK_NSEC << 8; + nsec_per_tick = (u64)NSEC_PER_SEC << 8; nsec_per_tick += (u32)shift_hz/2; do_div(nsec_per_tick, (u32)shift_hz); |