]> git.baikalelectronics.ru Git - kernel.git/commit
timers: Preserve higher bits of expiration on index calculation
authorFrederic Weisbecker <frederic@kernel.org>
Fri, 17 Jul 2020 14:05:41 +0000 (16:05 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 17 Jul 2020 19:55:21 +0000 (21:55 +0200)
commit13155608958adbc327e1c832a2e38fbaca13756c
treec6bafe07e103f73b9c092915ee0e4285110646b1
parent6cf64789c61e0061919d2ff26b01621c72779123
timers: Preserve higher bits of expiration on index calculation

The higher bits of the timer expiration are cropped while calling
calc_index() due to the implicit cast from unsigned long to unsigned int.

This loss shouldn't have consequences on the current code since all the
computation to calculate the index is done on the lower 32 bits.

However to prepare for returning the actual bucket expiration from
calc_index() in order to properly fix base->next_expiry updates, the higher
bits need to be preserved.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200717140551.29076-3-frederic@kernel.org
kernel/time/timer.c