From: Frederic Weisbecker <frederic@kernel.org>
To: Yun Zhou <yun.zhou@windriver.com>
Cc: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] timers: fix LVL_START macro
Date: Tue, 15 Nov 2022 13:02:39 +0100 [thread overview]
Message-ID: <20221115120239.GA721394@lothringen> (raw)
In-Reply-To: <20221115025614.79537-1-yun.zhou@windriver.com>
Hi Yun Zhou,
On Tue, Nov 15, 2022 at 10:56:14AM +0800, Yun Zhou wrote:
> The number of buckets per level should be LVL_SIZE, not LVL_SIZE-1.
>
> Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
> ---
> kernel/time/timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> index 717fcb9fb14a..1116b208093e 100644
> --- a/kernel/time/timer.c
> +++ b/kernel/time/timer.c
> @@ -161,7 +161,7 @@ EXPORT_SYMBOL(jiffies_64);
> * time. We start from the last possible delta of the previous level
> * so that we can later add an extra LVL_GRAN(n) to n (see calc_index()).
> */
> -#define LVL_START(n) ((LVL_SIZE - 1) << (((n) - 1) * LVL_CLK_SHIFT))
> +#define LVL_START(n) (LVL_SIZE << (((n) - 1) * LVL_CLK_SHIFT))
See the comment above:
"We start from the last possible delta of the previous level
so that we can later add an extra LVL_GRAN(n) to n (see calc_index())."
Thanks.
>
> /* Size of each clock level */
> #define LVL_BITS 6
> --
> 2.35.2
>
next prev parent reply other threads:[~2022-11-15 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 2:56 [PATCH] timers: fix LVL_START macro Yun Zhou
2022-11-15 12:02 ` Frederic Weisbecker [this message]
[not found] ` <SN6PR11MB300812CA336B497C40E93CA19F049@SN6PR11MB3008.namprd11.prod.outlook.com>
2022-11-15 22:40 ` Frederic Weisbecker
2022-11-16 23:48 ` Thomas Gleixner
2022-11-17 12:14 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221115120239.GA721394@lothringen \
--to=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=yun.zhou@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox