tick: Move individual bit features to debuggable mask accesses
authorFrederic Weisbecker <frederic@kernel.org>
Sun, 25 Feb 2024 22:55:04 +0000 (23:55 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Feb 2024 10:37:32 +0000 (11:37 +0100)
commita478ffb2ae234ee1ece2b84719762c54d304e2c7
tree65f1f3803cdd17c4d1b4c4be3b8269fd4a35d490
parent3ce74f1a8566dbbc9774f85fb0ce781fe290fd32
tick: Move individual bit features to debuggable mask accesses

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@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240225225508.11587-13-frederic@kernel.org
kernel/time/tick-sched.c
kernel/time/tick-sched.h
kernel/time/timer_list.c