]> git.baikalelectronics.ru Git - kernel.git/commit
tick: Get rid of tick_period
authorThomas Gleixner <tglx@linutronix.de>
Tue, 17 Nov 2020 13:19:49 +0000 (14:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:40 +0000 (11:35 +0200)
commit73bfd96803cb205a94f0ff429331e7aa91b6a00b
tree7566157d73dc18d3a597d43687c197d6f3d917fd
parent822892616c3a23d3314b5ae4fcd83bb3bd725c17
tick: Get rid of tick_period

[ Upstream commit 42fdb3c5592517a6c0cc9e5966ef36d4acb594ab ]

The variable tick_period is initialized to NSEC_PER_TICK / HZ during boot
and never updated again.

If NSEC_PER_TICK is not an integer multiple of HZ this computation is less
accurate than TICK_NSEC which has proper rounding in place.

Aside of the inaccuracy there is no reason for having this variable at
all. It's just a pointless indirection and all usage sites can just use the
TICK_NSEC constant.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201117132006.766643526@linutronix.de
Stable-dep-of: e9523a0d8189 ("tick/common: Align tick period with the HZ tick.")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-internal.h
kernel/time/tick-sched.c