Re: [PATCH 12/15] tick: Move individual bit features to debuggable mask accesses

From: Thomas Gleixner
Date: Thu Jan 25 2024 - 04:41:17 EST


On Wed, Jan 24 2024 at 18:04, Frederic Weisbecker wrote:
> The individual bitfields of struct tick_sched must be modified from
> IRQs disabled places, otherwise local modifications can race due to them
> sharing the same memory storage.
>
> The recent move of the "got_idle_tick" bitfield to its own storage shows
> that the use of these bitfields, as pretty as they look, can be as much
> error prone.
>
> In order to avoid future issues of the like and make sure that those
> bitfields are safely accessed, move those flags to an explicit mask
> along with a mutator function performing the basic IRQs disabled sanity
> check.
>
> Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>