Re: [PATCH] timer: Preserve higher bits of expiration on index calculation

From: Thomas Gleixner
Date: Thu Jul 16 2020 - 10:24:23 EST


Frederic Weisbecker <frederic@xxxxxxxxxx> writes:
> Subject: [PATCH] timer: 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 we are preparing to return the actual bucket expiration from
> calc_index() in order to properly fix base->next_expiry updates.
> Preserving the higher bits is a requirement to achieve that.

Nice catch!