[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1488880534-3777-1-git-send-email-fweisbec@gmail.com>
Date: Tue, 7 Mar 2017 10:55:34 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Meelis Roos <mroos@...ux.ee>
Subject: [PATCH] jiffies: Revert mistaken conversion of NSEC_PER_SEC to TICK_NSEC
The following commit:
93825f2ec736f30e034ab7c9d56b42849c5b00da
("jiffies: Reuse TICK_NSEC instead of NSEC_PER_JIFFY")
has introduced a wrong rename due to a confusion between NSEC_PER_JIFFY
and NSEC_PER_SEC. As a result, the calculation of refined jiffies got
broken, triggering lockups.
Reported-and-tested-by: Meelis Roos <mroos@...ux.ee>
Cc: Meelis Roos <mroos@...ux.ee>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
kernel/time/jiffies.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 7906b3f..4977191 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);
--
2.7.4
Powered by blists - more mailing lists