timekeeping: Use u32 for clock_was_set_seq

Use an explicitly sized type to make the code a bit more consistent
with other fields of the datastructure and other sequence counters.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-2-910cbd485390@linutronix.de
This commit is contained in:
Thomas Weißschuh (Schneider Electric)
2026-08-03 12:04:33 +02:00
committed by Thomas Gleixner
parent 4f39d3c19b
commit 406a037ce7
6 changed files with 8 additions and 7 deletions

View File

@@ -84,7 +84,7 @@ struct hrtimer_cpu_base {
raw_spinlock_t lock;
unsigned int cpu;
unsigned int active_bases;
unsigned int clock_was_set_seq;
u32 clock_was_set_seq;
bool hres_active;
bool deferred_rearm;
bool deferred_needs_update;

View File

@@ -169,7 +169,7 @@ struct timekeeper {
u32 cs_ns_to_cyc_mult;
u32 cs_ns_to_cyc_shift;
u64 cs_ns_to_cyc_maxns;
unsigned int clock_was_set_seq;
u32 clock_was_set_seq;
u8 cs_was_changed_seq;
u8 clock_valid;

View File

@@ -303,7 +303,7 @@ struct system_time_snapshot {
ktime_t monoraw;
enum clocksource_ids cs_id;
enum clocksource_ids hw_csid;
unsigned int clock_was_set_seq;
u32 clock_was_set_seq;
u8 cs_was_changed_seq;
u8 valid;
};

View File

@@ -903,8 +903,8 @@ static void hrtimer_reprogram(struct hrtimer *timer, bool reprogram)
static bool update_needs_ipi(struct hrtimer_cpu_base *cpu_base, unsigned int active)
{
struct hrtimer_clock_base *base;
unsigned int seq;
ktime_t expires;
u32 seq;
/*
* Update the base offsets unconditionally so the following

View File

@@ -1567,10 +1567,11 @@ int get_device_system_crosststamp(int (*get_time_fn)
struct system_device_crosststamp *xtstamp)
{
u64 syscnt_cycles, cycles, now, interval_start;
unsigned int seq, clock_was_set_seq = 0;
ktime_t base_sys, base_raw, *offs;
u32 clock_was_set_seq = 0;
u64 nsec_sys, nsec_raw;
u8 cs_was_changed_seq;
unsigned int seq;
bool do_interp;
struct timekeeper *tk;
struct tk_data *tkd;
@@ -2843,7 +2844,7 @@ void do_timer(unsigned long ticks)
*
* Called from hrtimer_interrupt() or retrigger_next_event()
*/
ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq, ktime_t *offs_real,
ktime_t ktime_get_update_offsets_now(u32 *cwsseq, ktime_t *offs_real,
ktime_t *offs_boot, ktime_t *offs_tai)
{
struct timekeeper *tk = &tk_core.timekeeper;

View File

@@ -4,7 +4,7 @@
/*
* Internal interfaces for kernel/time/
*/
extern ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq,
extern ktime_t ktime_get_update_offsets_now(u32 *cwsseq,
ktime_t *offs_real,
ktime_t *offs_boot,
ktime_t *offs_tai);