From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933732AbdABVOJ (ORCPT ); Mon, 2 Jan 2017 16:14:09 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:36465 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933414AbdABVN4 (ORCPT ); Mon, 2 Jan 2017 16:13:56 -0500 From: Zhihui Zhang To: tglx@linutronix.de, john.stultz@linaro.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] timers: Reconcile the code and the comment for the 250HZ case Date: Mon, 2 Jan 2017 16:14:19 -0500 Message-Id: <1483391659-9752-1-git-send-email-zzhsuny@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adjust the time start of each level to match the comments. Note that LVL_START(n) is never used for n = 0 case. Also, each level (except level 0) has more than enough room to accommodate all its timers. Signed-off-by: Zhihui Zhang --- kernel/time/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index ec33a69..268d5ae 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -132,7 +132,7 @@ EXPORT_SYMBOL(jiffies_64); * 5 320 131072 ms (~2m) 1048576 ms - 8388607 ms (~17m - ~2h) * 6 384 1048576 ms (~17m) 8388608 ms - 67108863 ms (~2h - ~18h) * 7 448 8388608 ms (~2h) 67108864 ms - 536870911 ms (~18h - ~6d) - * 8 512 67108864 ms (~18h) 536870912 ms - 4294967288 ms (~6d - ~49d) + * 8 512 67108864 ms (~18h) 536870912 ms - 4294967295 ms (~6d - ~49d) * * HZ 100 * Level Offset Granularity Range @@ -157,7 +157,7 @@ EXPORT_SYMBOL(jiffies_64); * The time start value for each level to select the bucket at enqueue * time. */ -#define LVL_START(n) ((LVL_SIZE - 1) << (((n) - 1) * LVL_CLK_SHIFT)) +#define LVL_START(n) (LVL_SIZE << (((n) - 1) * LVL_CLK_SHIFT)) /* Size of each clock level */ #define LVL_BITS 6 -- 2.7.4