mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh (Schneider Electric)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
	Thomas Gleixner <tglx@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] timekeeping: Use u32 for clock_was_set_seq
Date: Tue, 11 Aug 2026 16:14:21 -0000	[thread overview]
Message-ID: <178646486149.442315.6992542022268380732.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260803-auxclock-nanosleep-prep-v2-2-910cbd485390@linutronix.de>

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     406a037ce7a03a37bf2b03010791ea9343ecc233
Gitweb:        https://git.kernel.org/tip/406a037ce7a03a37bf2b03010791ea9343ecc233
Author:        Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate:    Mon, 03 Aug 2026 12:04:33 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 11 Aug 2026 18:11:20 +02:00

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
---
 include/linux/hrtimer_bases.h       | 2 +-
 include/linux/timekeeper_internal.h | 2 +-
 include/linux/timekeeping.h         | 2 +-
 kernel/time/hrtimer.c               | 2 +-
 kernel/time/timekeeping.c           | 5 +++--
 kernel/time/timekeeping.h           | 2 +-
 6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/include/linux/hrtimer_bases.h b/include/linux/hrtimer_bases.h
index 70b99e6..d4c83ec 100644
--- a/include/linux/hrtimer_bases.h
+++ b/include/linux/hrtimer_bases.h
@@ -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;
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index 9c198f6..fe077d9 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -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;
 
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 561313b..efa9442 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -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;
 };
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 48ee17e..540561d 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index d02103b..ea2e6e5 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -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;
diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h
index 198d060..4201f9e 100644
--- a/kernel/time/timekeeping.h
+++ b/kernel/time/timekeeping.h
@@ -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);

  reply	other threads:[~2026-08-11 16:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 10:04 [PATCH v2 00/17] timekeeping, hrtimer: Assorted cleanups Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 01/17] timekeeping: Rename clockid_aux_valid() to clockid_is_aux_clock() Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 02/17] timekeeping: Use u32 for clock_was_set_seq Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` tip-bot2 for Thomas Weißschuh (Schneider Electric) [this message]
2026-08-03 10:04 ` [PATCH v2 03/17] hrtimer: Add a lockdep assertion to hrtimer_update_base() Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 04/17] timer_list: Use standard 'long long' format placeholders Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 05/17] timer_list: Use ktime_t over nanoseconds Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 06/17] selftests: add clock-helpers.h Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] selftests: Add clock-helpers.h tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 07/17] selftests: timers: Use clock_name() and constants from clock-helpers.h Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 08/17] selftests: timers: nanosleep: Drop output alignment Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 09/17] selftests: timers: nanosleep: Explicitly list the tested clocks Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 10/17] selftests: timers: nanosleep: Reuse kselftest error numbers Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 11/17] selftests: timers: nanosleep: Move all single clock tests out of the loop in main() Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 12/17] selftests: timers: nanosleep: Explicitly handle timer_delete() failure Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 13/17] selftests: timers: nanosleep: Report each test separately Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 14/17] selftests: timers: nsleep-lat: Use NSEC_PER_MSEC define for unreasonable latency Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 15/17] selftests: timers: nsleep-lat: Explicitly list the tested clocks Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 16/17] selftests: timers: nsleep-lat: Reuse kselftest error numbers Thomas Weißschuh (Schneider Electric)
2026-08-11 16:14   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-08-03 10:04 ` [PATCH v2 17/17] selftests: timers: nsleep-lat: Check all calls to clock_nanosleep() and clock_gettime() Thomas Weißschuh (Schneider Electric)
2026-08-11 16:13   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178646486149.442315.6992542022268380732.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®