From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A1BA1A6815; Wed, 11 Mar 2026 10:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224181; cv=none; b=d/6CajVeVjY2tqdgr6uW/i959Yn6f5NQiluUlx1RDazNakMV0sb3jj1bJhyVtJDuGiqD5xWvxv24VxDRtHKihSqzFy8MSwAq/gxw4lwvds86fqVkKE9OXYNY0tYctw24hE8A1rryTL+0V31P/mcWqcwckvCMQR2FVzogZwkFzL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224181; c=relaxed/simple; bh=re8JDRCPYzgZOEMayn+dpu8izTgVZs4o4lu4tO+6g4c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mhDKcSfVIvF+ttniFHg/WUe0l+PkkZdbCBZl/ZH/2Jc6HnbnT4HWArjTcyKeyQAta8m5B0gE5GAL3RM4zM+aSjfBhAuLfOVwQkANJktVQLZQdjjcDHdKJBb9+5lXQi+TbBeOP4G6daGWa1H3fSp2twpWSkSwKf7GZbKvZXyE7VU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=B1F4q3Bb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Mupnw1zo; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="B1F4q3Bb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Mupnw1zo" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HZM0DU4QRem/47Ih92uwxuhlHlKL6kjp0QYOR6qvTog=; b=B1F4q3BbFrfG2r2JL5eCGaYbECu7Oyhu7I5AQPEafeb4aKy3FzelBUey5pW0hCVGTcDd2Q OLDz1JtjnNPOXfORjhM+XaRGepJ2xZr1AMj/8MzpIRTNafNr62AZzSyvuMfkKa1shQmLA2 f5Js+gRH9+ngYmjZJE2rW9Jqdqw9tRUpCgBO/ETdHzGV1E7ThAzJn0Jurc7+6W4bDjgfFJ QcAOpuSaPkeeMUw/ymajDl2YCF59JR3JhvJL7QQvX6QmHugSn+ZaIYtKGDRZ8iqkdwTsaY KgIp2bbvoHruXqoVTtKOmsGUH83mx5I4KXJm04OKYtGE7QpGmzGO8yw3qrAuaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HZM0DU4QRem/47Ih92uwxuhlHlKL6kjp0QYOR6qvTog=; b=Mupnw1zoEJSLQQkDdaiFSPpEt8ghtFHBnO4jwVqZnl0mNpVCl+6h2F5/Tsap+9YeENUJqM 4dcfvxyt2QUByBCQ== Date: Wed, 11 Mar 2026 11:15:10 +0100 Subject: [PATCH 01/12] scripts/gdb: timerlist: Adapt to move of tk_core Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-1-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=1009; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=re8JDRCPYzgZOEMayn+dpu8izTgVZs4o4lu4tO+6g4c=; b=BmRh1fl3moNOUCIbPDcMqY1T+jEs2k4UqK400XIZDqrlHqh4EusxGbiB9DRHlbE+3AonII1+v 8CbtdKUHYA+CZChpyYSDqxjFKZj4ecW7IXr42sTd/8pfeRex4XmLTZP X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= tk_core is a macro today which can not be resolved by gdb. Use the correct symbol expression to reference tk_core. Fixes: 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers") Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- scripts/gdb/linux/timerlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py index ccc24d30de80..9fb3436a217c 100644 --- a/scripts/gdb/linux/timerlist.py +++ b/scripts/gdb/linux/timerlist.py @@ -20,7 +20,7 @@ def ktime_get(): We can't read the hardware timer itself to add any nanoseconds that need to be added since we last stored the time in the timekeeper. But this is probably good enough for debug purposes.""" - tk_core =3D gdb.parse_and_eval("&tk_core") + tk_core =3D gdb.parse_and_eval("&timekeeper_data[TIMEKEEPER_CORE]") =20 return tk_core['timekeeper']['tkr_mono']['base'] =20 --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4163C9ED6; Wed, 11 Mar 2026 10:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; cv=none; b=T454OylCRax+m3g+Lx5d5mWQpjjKaagMk7iAiR7MDKOq7A0WGWbnEEXszmQuF86kBHD0sOYbzP0lhqi140zWtMGHQIUFd+0NJ0V3s3r7A3laiXMfm+U3um/nsKQ1FJKpjYAq/Zadz0woYFfNl5Ufsr/DwAI8oG4I17jmbbtPqwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; c=relaxed/simple; bh=l/6PPioz7XUAIf9K5t4D5qRSQiDICVhNnTBRg93So4k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ibWZdv6B1x4CLQ6J2rGwzAlmsfLWmJdtTSyxQczheEEwld8LtuWQ4UaogaRvEg+3UD4/aUPK/wlr9G9IN1HyGlPE8FR2yUH+0aKNsfiv82vJqppYA7NM5i89JdQgoCqjdIiAxLaN6zEtZGYe8Mw//r1aPMgKq6Ds8BZiAYtMKDs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mtO9d9xc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=biD5OHeR; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mtO9d9xc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="biD5OHeR" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q5k89UukUYoQ08hlFR/70ql+PrIS9Rbff4VgpCkXn34=; b=mtO9d9xcRjcGNh2CsK5gjKa+yeYGviqg3oLb0cEsm75mODvvxopnofXIFtl18vAedBvmRo pA/2eQQvQwiEDdQGjqS+RvaN8VHumfGSS2tmPweF57PN4ZbzUGYFt6ixge9YPOkA3ZHPVx aqqUQF725tVw1EhUuU7IVoLm6mMO0nsB40R1jNgAhkkS+PG1oeBf/HHZRUllnR3T9j6alv pzXfk6qvKfuK2l7ypfuYGK61PYVMQ5LaBKuSClqFqsxlqwPegonphqMqhs+YrU089OoDcT pftj2CuVXbrCdm3bX3E+UMol2mNkADXKXHnQITFs7b4lWTerqeB3FmvSeaxlQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q5k89UukUYoQ08hlFR/70ql+PrIS9Rbff4VgpCkXn34=; b=biD5OHeRAY4KsI4KwDEcNDT/0e5QWgPZjNcr0dWsClOCQQEz7dhKRyLdp2boiVEbuu1/as PFTMge4P047Fv0Ag== Date: Wed, 11 Mar 2026 11:15:11 +0100 Subject: [PATCH 02/12] tracing: Use explicit array size instead of sentinel elements in symbol printing Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-2-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=8745; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=l/6PPioz7XUAIf9K5t4D5qRSQiDICVhNnTBRg93So4k=; b=S4E2SX+3ZcwI9BQ9hz3sGrK9zF5AjIVUZIQaWus0wdfL5dY/wIWhsMYAQ7dp2KWMMbXHPx8tF P42xjFp6X+PBzZ+oseeMXMoxHqvw5rR32vObeioB7EIZXbhl0GtOKcv X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The sentinel value added by the wrapper macros __print_symbolic() et al prevents the callers from adding their own trailing comma. This makes constructing symbol list dynamically based on kconfig values tedious. Drop the sentinel elements, so callers can either specify the trailing comma or not, just like in regular array initializers. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/linux/trace_events.h | 13 ++++++---- include/trace/stages/stage3_trace_output.h | 40 +++++++++++++++-----------= ---- kernel/trace/trace_events_synth.c | 4 +-- kernel/trace/trace_output.c | 20 +++++++++------ kernel/trace/trace_syscalls.c | 3 +-- 5 files changed, 43 insertions(+), 37 deletions(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 37eb2f0f3dd8..40a43a4c7caf 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -22,20 +22,23 @@ union bpf_attr; =20 const char *trace_print_flags_seq(struct trace_seq *p, const char *delim, unsigned long flags, - const struct trace_print_flags *flag_array); + const struct trace_print_flags *flag_array, + size_t flag_array_size); =20 const char *trace_print_symbols_seq(struct trace_seq *p, unsigned long val, - const struct trace_print_flags *symbol_array); + const struct trace_print_flags *symbol_array, + size_t symbol_array_size); =20 #if BITS_PER_LONG =3D=3D 32 const char *trace_print_flags_seq_u64(struct trace_seq *p, const char *del= im, unsigned long long flags, - const struct trace_print_flags_u64 *flag_array); + const struct trace_print_flags_u64 *flag_array, + size_t flag_array_size); =20 const char *trace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val, - const struct trace_print_flags_u64 - *symbol_array); + const struct trace_print_flags_u64 *symbol_array, + size_t symbol_array_size); #endif =20 struct trace_iterator; diff --git a/include/trace/stages/stage3_trace_output.h b/include/trace/sta= ges/stage3_trace_output.h index fce85ea2df1c..b7d8ef4b9fe1 100644 --- a/include/trace/stages/stage3_trace_output.h +++ b/include/trace/stages/stage3_trace_output.h @@ -64,36 +64,36 @@ #define __get_rel_sockaddr(field) ((struct sockaddr *)__get_rel_dynamic_ar= ray(field)) =20 #undef __print_flags -#define __print_flags(flag, delim, flag_array...) \ - ({ \ - static const struct trace_print_flags __flags[] =3D \ - { flag_array, { -1, NULL }}; \ - trace_print_flags_seq(p, delim, flag, __flags); \ +#define __print_flags(flag, delim, flag_array...) \ + ({ \ + static const struct trace_print_flags __flags[] =3D \ + { flag_array }; \ + trace_print_flags_seq(p, delim, flag, __flags, ARRAY_SIZE(__flags)); \ }) =20 #undef __print_symbolic -#define __print_symbolic(value, symbol_array...) \ - ({ \ - static const struct trace_print_flags symbols[] =3D \ - { symbol_array, { -1, NULL }}; \ - trace_print_symbols_seq(p, value, symbols); \ +#define __print_symbolic(value, symbol_array...) \ + ({ \ + static const struct trace_print_flags symbols[] =3D \ + { symbol_array }; \ + trace_print_symbols_seq(p, value, symbols, ARRAY_SIZE(symbols)); \ }) =20 #undef __print_flags_u64 #undef __print_symbolic_u64 #if BITS_PER_LONG =3D=3D 32 -#define __print_flags_u64(flag, delim, flag_array...) \ - ({ \ - static const struct trace_print_flags_u64 __flags[] =3D \ - { flag_array, { -1, NULL } }; \ - trace_print_flags_seq_u64(p, delim, flag, __flags); \ +#define __print_flags_u64(flag, delim, flag_array...) \ + ({ \ + static const struct trace_print_flags_u64 __flags[] =3D \ + { flag_array }; \ + trace_print_flags_seq_u64(p, delim, flag, __flags, ARRAY_SIZE(__flags));= \ }) =20 -#define __print_symbolic_u64(value, symbol_array...) \ - ({ \ - static const struct trace_print_flags_u64 symbols[] =3D \ - { symbol_array, { -1, NULL } }; \ - trace_print_symbols_seq_u64(p, value, symbols); \ +#define __print_symbolic_u64(value, symbol_array...) \ + ({ \ + static const struct trace_print_flags_u64 symbols[] =3D \ + { symbol_array }; \ + trace_print_symbols_seq_u64(p, value, symbols, ARRAY_SIZE(symbols)); \ }) #else #define __print_flags_u64(flag, delim, flag_array...) \ diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_= synth.c index 8bb95b2a6fcf..39ac4eba0702 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -395,7 +395,7 @@ static enum print_line_t print_synth_event(struct trace= _iterator *iter, n_u64++; } else { struct trace_print_flags __flags[] =3D { - __def_gfpflag_names, {-1, NULL} }; + __def_gfpflag_names }; char *space =3D (i =3D=3D se->n_fields - 1 ? "" : " "); =20 print_synth_event_num_val(s, print_fmt, @@ -408,7 +408,7 @@ static enum print_line_t print_synth_event(struct trace= _iterator *iter, trace_seq_puts(s, " ("); trace_print_flags_seq(s, "|", entry->fields[n_u64].as_u64, - __flags); + __flags, ARRAY_SIZE(__flags)); trace_seq_putc(s, ')'); } n_u64++; diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 1996d7aba038..96e2d22b4364 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -69,14 +69,15 @@ enum print_line_t trace_print_printk_msg_only(struct tr= ace_iterator *iter) const char * trace_print_flags_seq(struct trace_seq *p, const char *delim, unsigned long flags, - const struct trace_print_flags *flag_array) + const struct trace_print_flags *flag_array, + size_t flag_array_size) { unsigned long mask; const char *str; const char *ret =3D trace_seq_buffer_ptr(p); int i, first =3D 1; =20 - for (i =3D 0; flag_array[i].name && flags; i++) { + for (i =3D 0; i < flag_array_size && flags; i++) { =20 mask =3D flag_array[i].mask; if ((flags & mask) !=3D mask) @@ -106,12 +107,13 @@ EXPORT_SYMBOL(trace_print_flags_seq); =20 const char * trace_print_symbols_seq(struct trace_seq *p, unsigned long val, - const struct trace_print_flags *symbol_array) + const struct trace_print_flags *symbol_array, + size_t symbol_array_size) { int i; const char *ret =3D trace_seq_buffer_ptr(p); =20 - for (i =3D 0; symbol_array[i].name; i++) { + for (i =3D 0; i < symbol_array_size; i++) { =20 if (val !=3D symbol_array[i].mask) continue; @@ -133,14 +135,15 @@ EXPORT_SYMBOL(trace_print_symbols_seq); const char * trace_print_flags_seq_u64(struct trace_seq *p, const char *delim, unsigned long long flags, - const struct trace_print_flags_u64 *flag_array) + const struct trace_print_flags_u64 *flag_array, + size_t flag_array_size) { unsigned long long mask; const char *str; const char *ret =3D trace_seq_buffer_ptr(p); int i, first =3D 1; =20 - for (i =3D 0; flag_array[i].name && flags; i++) { + for (i =3D 0; i < flag_array_size && flags; i++) { =20 mask =3D flag_array[i].mask; if ((flags & mask) !=3D mask) @@ -170,12 +173,13 @@ EXPORT_SYMBOL(trace_print_flags_seq_u64); =20 const char * trace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val, - const struct trace_print_flags_u64 *symbol_array) + const struct trace_print_flags_u64 *symbol_array, + size_t symbol_array_size) { int i; const char *ret =3D trace_seq_buffer_ptr(p); =20 - for (i =3D 0; symbol_array[i].name; i++) { + for (i =3D 0; i < symbol_array_size; i++) { =20 if (val !=3D symbol_array[i].mask) continue; diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 37317b81fcda..8ad72e17d8eb 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c @@ -174,7 +174,6 @@ sys_enter_openat_print(struct syscall_trace_enter *trac= e, struct syscall_metadat { O_NOFOLLOW, "O_NOFOLLOW" }, { O_NOATIME, "O_NOATIME" }, { O_CLOEXEC, "O_CLOEXEC" }, - { -1, NULL } }; =20 trace_seq_printf(s, "%s(", entry->name); @@ -205,7 +204,7 @@ sys_enter_openat_print(struct syscall_trace_enter *trac= e, struct syscall_metadat trace_seq_puts(s, "O_RDONLY|"); } =20 - trace_print_flags_seq(s, "|", bits, __flags); + trace_print_flags_seq(s, "|", bits, __flags, ARRAY_SIZE(__flags)); /* * trace_print_flags_seq() adds a '\0' to the * buffer, but this needs to append more to the seq. --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 480553C9444; Wed, 11 Mar 2026 10:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; cv=none; b=SmwEkMYQt7APxirzj7m6QUEzNz2i+BmtUNH+W0QbiLIQHXzS+q/JV1PTRC5p4IGg1UdAHb7HlwSNYYAKBetssinerAJTpY4qPThtsoOixZI8zKbX5GMfZ1n4RJzjJmkkvSsyeq/GyEplXYb9Nt4Chw9BMeQZT08dcrlw6rzLH2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; c=relaxed/simple; bh=/pGu31gu6J6DDH6/SJ0ZAkz4gMH53WYvv9stcPp5eEM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JIvtENKSEZD61zqGpJ0jJBP/k1znbCDz/DBiLcN5zw3MwZp63Cqw4r9aIka8n2matiDe2+puByMiaNJZQsPEZWdty5WJW6A/X60lfq845iLxyETtJM1sk7ColoEr6hewTMwLZdN2LmFB0rbKN6cboNQmuR/GhLewOu4hnNiHNW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Ck8X6gOJ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Z1kzaltu; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ck8X6gOJ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Z1kzaltu" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0LmkymabnXdWeq/Ge02unx5jQD/Pes85LEyCk13947Y=; b=Ck8X6gOJ2VfNvFFu6VEr2G9MOlGZLPmfvMvEYJ/YEOPnXkhenb9ncPUeH+8DQgMO9NCkVs dit3ls46X+hzqJfeO/ZnAmd96KNI9RJ/L2V53tawWF+s3RzmLXGfu4dlw0H/+So/2vgji2 Rx8qZlFMMtCdQHKaD4LvF9HI8+kZ8cG4gyUwpIXFK8uLFuTcoyEDNod8OMC6U5jq9QHmH9 jOktCcyhyaF2jJijSRtLLV8fT+Ey9du0isdxFIrl3B+GHWNQTclJdDJreDCj+MlJkLrtTf 65tKfWCM39GHEIvB8pDYkBuXC0nGbpnCfVQfRu5sWmyg0ALbajH2T6P04hU6fw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0LmkymabnXdWeq/Ge02unx5jQD/Pes85LEyCk13947Y=; b=Z1kzaltuFp+lrY/vFr57ao4iMwIruR9soS12PtnwAi4btkai0Hju/RUYQiq1P/HCLecXvD STJl8ev8aW7u2gDA== Date: Wed, 11 Mar 2026 11:15:12 +0100 Subject: [PATCH 03/12] timer_list: Print offset as signed integer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-3-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=945; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=/pGu31gu6J6DDH6/SJ0ZAkz4gMH53WYvv9stcPp5eEM=; b=EqTmGXuZt0ECkVyiINEGtmNE+Cm9uC5ZhscZKBn8dlMCne1F72VUQIMeuRedv3VkV6ajTmn+l HYX6q10b8wFCmSrAYxJLKwC07/ig8yq/cXQ/s4y4TkcS0rkpzVktXco X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The offset of a hrtimer base may be negative. Print those values correctly. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- kernel/time/timer_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index e2e14fd1b466..427d7ddea3af 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -101,8 +101,8 @@ print_base(struct seq_file *m, struct hrtimer_clock_bas= e *base, u64 now) =20 SEQ_printf(m, " .resolution: %u nsecs\n", hrtimer_resolution); #ifdef CONFIG_HIGH_RES_TIMERS - SEQ_printf(m, " .offset: %Lu nsecs\n", - (unsigned long long) ktime_to_ns(base->offset)); + SEQ_printf(m, " .offset: %Ld nsecs\n", + (long long) base->offset); #endif SEQ_printf(m, "active timers:\n"); print_active_timers(m, base, now + ktime_to_ns(base->offset)); --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA90C3C9EEB; Wed, 11 Mar 2026 10:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; cv=none; b=gc0LYrIH64fNT5LZsmp70TQkQrcxXauStF0BS8OWxWu1kvlz4L9TMs3D1QNvrtZoVku9SIC9TknE72OmYQUT5NE9kG1sp2mI0yoxCGZ3wkJDIsG4dtpwpd+MBY378WxA7k/PwsObU5ybMmpiHeUNMNJbK+Q229P+S/jLWFc3RJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224182; c=relaxed/simple; bh=kurRXUCo7OfBthe3tV4P5mSmDlzeULf8xwGygLvMcSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tX07x80qMaSdOH3Mxb5Hkrm69KXTnxV5iClNak+AkzZAGk348DYvB+jOpzu+mVdlVZACrct9p5F07qHmUqWXXBkhX/cKzAyivApqTq7dK0uysgG5aM/ts8Y1QUu8+1priUycC4HYpvdtOfElTEjw2hNc0D28ZeLGMDVuFLS2K3U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Vo1ks4fy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5awxQcdK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Vo1ks4fy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5awxQcdK" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WCKXRqxiuhIrg3ee6neMev5gBvLIWyRDcDEDwP1EOIg=; b=Vo1ks4fyPoYkDfWFZtgeqjL+E+JZPwC5IKfHhXYtyClRdP2N+nWHaeUlETupLY+eTBc+vn BgcY5spfWEVrUS+JoRlWYRbgQsh3SlrVYgV2bQSCAUcl2vOaVzmacdP4ghK88Rc6SabxR4 w2Ji0F4P+eRyBMeBkW62K07wDhleyzFtfVTpETpfYLB2u48dT+nyp3kKm6rsWKr5eJP4mu qjweTqc3UUSyvzT1KzkYeyGITjQA9p/c1LEf8bOa60tb44PEnk5Hf0ZeQMPJvg85ijTFYT S5Kf6Ju7WzqXts7IMu8pdnXBjZCtQcJdk/weGoZfW+zjnw0H1KCZpGCIOIwZnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WCKXRqxiuhIrg3ee6neMev5gBvLIWyRDcDEDwP1EOIg=; b=5awxQcdKGx7bLXU5HxB1jVhHfXlG/YI+Srt7IeWJXxP0POifKs4xrxVt77ci1g83UNncFl F2norV58gVxAzJCw== Date: Wed, 11 Mar 2026 11:15:13 +0100 Subject: [PATCH 04/12] timekeeping: auxclock: Consistently use raw timekeeper for tk_setup_internals() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-4-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=896; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=kurRXUCo7OfBthe3tV4P5mSmDlzeULf8xwGygLvMcSY=; b=zVh5yiMLdUPkP8HzQgDFnv1EixUcvjp34ElakXKn5JfSydg0blbpKb7NUy7ttUE8QYiA35rbV iOohY7y9AwzAEQKXtPuikkBYPPxDKb8Lc0arr4xl+PwfoskOAAYjHUI X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= In aux_clock_enable() the clocksource from tkr_raw is used to call tk_setup_internals(). Do the same in tk_aux_update_clocksource(). While the clocksources will be the same in any case, this is less confusing. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 5153218df29f..46b77c3deb95 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2985,7 +2985,7 @@ static void tk_aux_update_clocksource(void) continue; =20 timekeeping_forward_now(tks); - tk_setup_internals(tks, tk_core.timekeeper.tkr_mono.clock); + tk_setup_internals(tks, tk_core.timekeeper.tkr_raw.clock); timekeeping_update_from_shadow(tkd, TK_UPDATE_ALL); } } --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4211E3C943A; Wed, 11 Mar 2026 10:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224183; cv=none; b=ml5F0QSOxw3whxiCWFT0z57HLen7YWJiaoHzdyuGREnDTFQxwrsybasXcIWe1h6cylRSpmmyzloAqzeNH+o+Yy7EuRMJZd8h0D+t/2gD57XrFUs+hBxI9JewQENuDINzW8MfST/2pvIF8eGHfLA19LZqAuANvNY4LIrm2fNrLgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224183; c=relaxed/simple; bh=8+MLDaCSM0MSOJ9HU/8HVQtykhvH4AGT9aWVx61Jn20=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W5P0pURFibjDE7TH82N3mxLrD2DOpf2o5MmglFZQILIeDF1+HKCVOiwNqmSHJnbFACU1THRPKJsnTjDwMQXfbBqohWrP/nga/BedYueujQMOJcZvnnxx+QkXwc6cSxLMNpoTDq7/aOwQ3loMyxsJTc/36VmDSbQ7JziKrhQvRgg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=m75o3Gpi; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BK89OeL5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="m75o3Gpi"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BK89OeL5" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oRLaIn3ZVXeoA5KaFSl2ICf9KwjqTgv/ecRWgaINhBA=; b=m75o3GpixcEgdhOp+jBO4W/Dy4kEL77U0azizIxyf0vGjdxk4zety5XkbQ6vnZvhjSTny8 FWTMmNSFrbrrMliqpvnAZYylcB+0ssm6JSlKwDOTX6q29GOhCShDtGFKs3Iq3vddLqEHHk 0aqbdbuATvEj1UvEB0K1Ldw5gzjvSXYkWn5vVJAZCZy/afmGVTfyjGNnk6gy6ZEeH8o+1B l8AdY0k9RK+bDe5BYKU8A6Z1SRqqADz18OwpEVnVyhTpsIfug+Fw4a19YaWiExQK5Og7by SJ0SXLZwNJXcATRKBdlTfn9stXHWuxT+sILmIKitjS1+epCmRkwMHCr6X/MWVQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oRLaIn3ZVXeoA5KaFSl2ICf9KwjqTgv/ecRWgaINhBA=; b=BK89OeL5GzpncybxPcRCUEQuhEiYp7GRcE10xGZ+W8fhPcUeKCcSZUL6RAd3a8kR+NLGgU GOtMqChk/6Vf7dBg== Date: Wed, 11 Mar 2026 11:15:14 +0100 Subject: [PATCH 05/12] timekeeping: Mark offsets array as const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-5-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=1858; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=8+MLDaCSM0MSOJ9HU/8HVQtykhvH4AGT9aWVx61Jn20=; b=KJZUpY6+lZ+Hs8okQj/SySUzFagkYeuXX1g8nEKqC6Oq10n9nOa0LTS/ndoqOyhkWSjfOJVIX xxeHY3CdgggA+0v6SaEnhvclrBPjgALHgr3FZUy1g6HWpNXw7B+CCMc X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Neither the array nor the offsets it is pointing to are meant to be changed through the array. Mark both the array and the values it points to as const. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- kernel/time/timekeeping.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 46b77c3deb95..27f17428f7c5 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -989,7 +989,7 @@ u32 ktime_get_resolution_ns(void) } EXPORT_SYMBOL_GPL(ktime_get_resolution_ns); =20 -static ktime_t *offsets[TK_OFFS_MAX] =3D { +static const ktime_t *const offsets[TK_OFFS_MAX] =3D { [TK_OFFS_REAL] =3D &tk_core.timekeeper.offs_real, [TK_OFFS_BOOT] =3D &tk_core.timekeeper.offs_boot, [TK_OFFS_TAI] =3D &tk_core.timekeeper.offs_tai, @@ -998,8 +998,9 @@ static ktime_t *offsets[TK_OFFS_MAX] =3D { ktime_t ktime_get_with_offset(enum tk_offsets offs) { struct timekeeper *tk =3D &tk_core.timekeeper; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; - ktime_t base, *offset =3D offsets[offs]; + ktime_t base; u64 nsecs; =20 WARN_ON(timekeeping_suspended); @@ -1019,8 +1020,9 @@ EXPORT_SYMBOL_GPL(ktime_get_with_offset); ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs) { struct timekeeper *tk =3D &tk_core.timekeeper; - ktime_t base, *offset =3D offsets[offs]; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; + ktime_t base; u64 nsecs; =20 WARN_ON(timekeeping_suspended); @@ -1043,7 +1045,7 @@ EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset); */ ktime_t ktime_mono_to_any(ktime_t tmono, enum tk_offsets offs) { - ktime_t *offset =3D offsets[offs]; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; ktime_t tconv; =20 --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5D523CAE6D; Wed, 11 Mar 2026 10:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224184; cv=none; b=S1OgTafq2rMNrKAkj1JGP/N0rAyA2z7UukX2E7cRJg3Fl8puKxBvom9MCiTGjTTXWEayiXgPvblGZo0xUZazXkUCUp/4hzxxxvIYWSoAG/DOcoRsDj040Zft1jJxT9wGq3AkPe7E3ZS0vdwTwhMXMYFV9ZuV4lh+aYeL1X2bN8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224184; c=relaxed/simple; bh=Rjblk5lG+/N1D4ncy0DNJlG86erv+vbGPCgFswiU2pw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cHw84MGXNpRYJ4tO85yI6KoynjFcEWqM/dEL7bvWO2+hbzoDU+lnfA4l0jTF5vHp1H9iJVQmpknfGNmyXuOieZFBGBn7QqYd7Bv1icLu+WjdNkoW87eo3EtTVVwsbNylIvPlkVsMjYWRcoG8I+k70w2KMq0ZEc/3w+lHNHmhW7Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=08TITzKL; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DRL3oMAQ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="08TITzKL"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DRL3oMAQ" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D/3Pupjtyw5OaqO+yHKDzdUCtAMdrSUWA4bAtmedxIQ=; b=08TITzKLZBDrJ4r5xRT2b4jzHSpyCmKeRdB8aVUhG8MkdmNJmUahT2KMMljO7uLLG1deBo RfQpXJlbUquei+zbmDe1nfvloYac3XpxDeCMQovQncLdZFxIllRNU0d8v3L1QGX0vfjf6v /OHuYd7YEUiN1qWO5ffEWAy318MO/TJnWB5tM4KG7SPwpd345on6OpRmekE+Ah7SEFDUS2 ZVLU9TwFS+6ZWTMad2tgl7xl9gjeGcpvXy2tqgQOa4haKBIlgdBaQzCK2ON+DFV2JDeRqj TZT83PGX9sv15ZlS97uAU5I1APnCdZ/ltf9oLUZGWXFnCip7/WXgGgL0io3tmw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D/3Pupjtyw5OaqO+yHKDzdUCtAMdrSUWA4bAtmedxIQ=; b=DRL3oMAQFu9vXwFv5F+aHnpuqhiVsP28UAfGWMtG+QBAKa3qHrspfZnndYuW1g50NCDpFn IPHot5DYd1rG4sDA== Date: Wed, 11 Mar 2026 11:15:15 +0100 Subject: [PATCH 06/12] hrtimer: Remove hrtimer_get_expires_ns() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-6-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=779; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Rjblk5lG+/N1D4ncy0DNJlG86erv+vbGPCgFswiU2pw=; b=Igi+MVWq7Iz0MTkzlPnCEq0zLBKeq5bgTVOmA/xebuJzPNUIz6VIWX+KXKxIRrPo0lXGxbhwy j2LRLj5NM7AArcvXW9givvh3IVQTUnawoyxicGo5oqBDBn4gwyS4zEB X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= There are no users left. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/linux/hrtimer.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index c087b7142330..9ced498fefaa 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -116,11 +116,6 @@ static inline ktime_t hrtimer_get_softexpires(const st= ruct hrtimer *timer) return timer->_softexpires; } =20 -static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer) -{ - return ktime_to_ns(timer->node.expires); -} - ktime_t hrtimer_cb_get_time(const struct hrtimer *timer); =20 static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *time= r) --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2E973CBE8C; Wed, 11 Mar 2026 10:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224185; cv=none; b=bFPiEa+6jR5fCc7wB6vqnwEgsHsofdHJj2eSqFkidiMEzP7ymz8LYwL7A5NxGKgSqp4/Xqt1buqlhuuqsNWiPzWPtTQiJ0IJVLWFy8ZcdWxAsvDRo/FOsyV+VUxyL/ekaHS3ApeHkHcrruJToxJ5wK0hD5ktH5KlR8YZMNnlFQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224185; c=relaxed/simple; bh=1qtoqo5zEbz0ht2GwSDm3/A9ci+SOUFm+t1wY8L/jXI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m8H/NlAMxIaG2/6X9v5ezSvE53nQAdVIhP0ITzyKIL8gyWHR1mrpfjMDfGr1XdMW3m0Kv48fAgZc91xO9lYZuyHrVSmXTEYt0bsHhxqxIcEFhsdxQp365Stuve39SGpH8o/oDq2wfHJ29r6dex6hIfr4AmVUq1VoNAYwIyLpRmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IRs4u4BX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+Q3zIioR; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IRs4u4BX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+Q3zIioR" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YRmhI3LAEwurtSkmPWvRPwNYsqDJWBN45KTy2yCTjc=; b=IRs4u4BXtCzaoSQS4mh4kxs1Lzzp/M5cqZ0FGD+ysqs6dOmXN3G1HozDmRVxb4gwxkVXYc 6UjlwbqOvrnxdBotp5eYBPiYKI+OdYyeM5BvNLLdk4hQP81s0OlUmMNbHr9iGdGfcal0Nf PUX27xKYsKrHmZipkhMSPmGmko3EYZCDEl2MJBmICGCyoPXQIPOdqWedRgS0cNqjN8n7XX XaydxXzW+NVOo6dTLNyOffDQtyYvViaJuzm5ZIYd4ljXy1TvCm/5ZE6SkG3TLQ8PuRkscC cjAQiMxLTRbffpDA4mbgtKl8PmsvTnO/dIfbm42sCe5j2asVuV8KgHlqbphBcg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YRmhI3LAEwurtSkmPWvRPwNYsqDJWBN45KTy2yCTjc=; b=+Q3zIioR+ORPjeC9538kVIa40rxNk02Mh+9jePYlzSPyv/YjeTFLfouBaZ7VKMQoeCZwuy 7nvpusr+0CrA25Dw== Date: Wed, 11 Mar 2026 11:15:16 +0100 Subject: [PATCH 07/12] hrtimer: Don't zero-initialize ret in hrtimer_nanosleep() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-7-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=795; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=1qtoqo5zEbz0ht2GwSDm3/A9ci+SOUFm+t1wY8L/jXI=; b=8D4F5Z8NRArCmMy6UsNTwapseSXa+g/VM9E46O4O2XFZVwZFSrcCd775L7XFqk2BiOifqxHWx 2wrUbdnXKD2BM/2MRbH6y+hSPX864Qu88r7I/xDhR0d1mEjo17n2y1b X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The value will be assigned to before any usage. No other function in hrtimer.c does such a zero-initialization. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- kernel/time/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index b94bd56b739f..226cac8c82cc 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2328,7 +2328,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtim= er_mode mode, const clockid { struct restart_block *restart; struct hrtimer_sleeper t; - int ret =3D 0; + int ret; =20 hrtimer_setup_sleeper_on_stack(&t, clockid, mode); hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns); --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 763F61A6815; Wed, 11 Mar 2026 10:16:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224185; cv=none; b=H/3rVtCqJy0UUpuuEZgeuuBJwwCHPglvWcKmYbTFUg6hWq870moGj7TQEKDNK8tyeU8K4E14CTP4slpXj51iZxlIBlB/osewWljTun2SFN5LH6W1Hk9+PAx0WYhd0ws2un6aZN75q4WU2dUm/+Fo06ito5abNm0YSRm+KADPpRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224185; c=relaxed/simple; bh=RvfSYNLElMKLWMTrIcGIpEfFedIm7sR5605pT5E8TW4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rG6OQ8J2bUg0SKvhosgRs8EjIutSEQ9SNJDpl3AKCXoZI6PrZ1BF2yh+GAtC9bX4j7eqslLMvNLm+qy0OSx0LP4jP7HX6faJ4EpnWbtW1GwaqJlePi6MdKoB+dtzTRjk7b4279RX95PLXDlE0beJfro8Fc4xlcNi5GB2vWCE5TM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dds2+onr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jCwWqRST; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dds2+onr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jCwWqRST" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hxeKUDc9QjCqDON/eW8Bk9qdboaknSu0XzAkuFYRR0w=; b=dds2+onrw+AHhHOEH6ya9+PVEuyVLmLHXkCu1mbhJZBY33d/7e5xoehrfEh6Ocg2Ex6rCD pTFn/Mefg8AR4eQNXdSVTycXSeNUUV8yBM4aBpSm/OQUMUCqkRhB91GCok0eEz5XaihUsB CV3jcMi5zftOhVBYFIPQmRxyI5QAxeX6b9aP6Wtc7kLdyI0dVnfnULwdIcxSse04apfYpQ 3DOaVVCIH7Ia9wmo2H5iQybr9NhcWo7ymYcu/VAHz0tsmXMGSoOnu9niN2eAcAD92hugwD jUfYvBqrrjnOjwIxJ1NC2ScGIrsPaByO/okGA6G/VX9Ygg4yvtzMCLXKvGgRjg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hxeKUDc9QjCqDON/eW8Bk9qdboaknSu0XzAkuFYRR0w=; b=jCwWqRSTjwJ1k7VBKrN1rFItJV1vdihsNkdKqBwmTSMsaYQHxuKJNFAjehPxjqWYqQeNFz yJ4d9jhvpdcrpqDg== Date: Wed, 11 Mar 2026 11:15:17 +0100 Subject: [PATCH 08/12] hrtimer: Drop spurious space in 'enum hrtimer_base_type' Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-8-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=708; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=RvfSYNLElMKLWMTrIcGIpEfFedIm7sR5605pT5E8TW4=; b=wWaij6brVOy/ScaSfQaOc3vSS1u+SR8TOtX34laF6PCAFAMMBCXM7AvUuiNB5XQa6pHExGWUK VwF9oHl3cuaBz83iwRSKv78AL2wG3HK4eKbnBv6vEjpqPWWOhJnX2vg X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= This spurious space makes grepping for the enum definition annoying. Remove it. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/linux/hrtimer_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index 0f851b2432c3..e6d4dc1b61e0 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -35,7 +35,7 @@ struct hrtimer_clock_base { ktime_t offset; } __hrtimer_clock_base_align; =20 -enum hrtimer_base_type { +enum hrtimer_base_type { HRTIMER_BASE_MONOTONIC, HRTIMER_BASE_REALTIME, HRTIMER_BASE_BOOTTIME, --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B3FC3CCFD1; Wed, 11 Mar 2026 10:16:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224186; cv=none; b=kd6KGtmOXuo5FfJTVPScqmbE/h+RhIrWUL8PMqG+QS6wj49sm6kATbGLdYlDSuJLf8WylIHLv0sC1PmvF/uKUD67MS+q7FP86j+0qKz8x1rSctrQ9RbyCbR8E8tSlBI7ywS6sABrhLAsyGnjkgL169r1tz8M/suwxz01pHEs0WI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224186; c=relaxed/simple; bh=YJZ29MYyQzOXkBfE1tfhpcdex3lVyVZuxApJtV5ngBA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fjzAJy32BhSIBkCupDrqC9z7LLAyUlGrZXL6+TzBhDN6BYR3eN+fO4CIQuTN8ZKwXE5GqFhSX3MuNRGm/d+HkxiNnWdczb3VuieF8shPcL2KFTBFSEzOwIiYNUolbHf0Pfx2uoQYhLFauhLDMwfmOLTtu8qgBfOEh37LE5Z5M5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DMya3wPX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aHlf4RyF; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DMya3wPX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aHlf4RyF" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q0sWT+/NCSlsPgVDIygbLH7QYDvLN5gFTeqUIZkXBbE=; b=DMya3wPXYKWuXQWWLx/w1OV+Jv7sgDsGfHOlXszLFD3YPxQR9qmUpjCLjNIq8pBX0N9bgT dXaegJfXoEZst5NLr3+NpepJm8zZqLEWmi2HLHLt/kDmELJSljxS/CXZNVz+GUjKl0HzIE hWiws7U56Uq5n4gkoNLiPyand5XUeZZ3ZSU77V10IVhzedZg2gRbgpI13sah8HB3LEKRVL BvRtm7X29Nuc6cm73hwv4dlfl8dFoPgZgSELxixyEOZraLvrMDYekAMVo3C/B7wRw9PZNw 2AN4pxBfC+EaTcOndrYSbW1Odn5KPvXTaqr2VEVpDsLMv0pu2do+ceIS2gWXmg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q0sWT+/NCSlsPgVDIygbLH7QYDvLN5gFTeqUIZkXBbE=; b=aHlf4RyF4g3539XmFmlZqP0Z2hAlyW06ihpHlyZOT4po156GZeNaVSulAPSjt8wdI7OweY 5hbIeHE6UqXUVWBg== Date: Wed, 11 Mar 2026 11:15:18 +0100 Subject: [PATCH 09/12] hrtimer: Drop unnecessary pointer indirection in hrtimer_expire_entry event Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-9-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=2302; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=YJZ29MYyQzOXkBfE1tfhpcdex3lVyVZuxApJtV5ngBA=; b=EHnK40lHZaBKI6F9QrN2/AdAvKdZ4xY+TZu4b4d5ZFXRRm2cIZvKV1JCm+kv+D0co+1o92qsu hchmesgzZugAoBZ/V7qghJh4qV+lKM91GDz+Pg+orgSKjwuUimkONKj X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= This pointer indirection is a remnant from when ktime_t was a struct, today it is pointless. Drop the pointer indirection. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/trace/events/timer.h | 7 +++---- kernel/time/hrtimer.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index a54613f59e55..07cbb9836b91 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -254,14 +254,13 @@ TRACE_EVENT(hrtimer_start, /** * hrtimer_expire_entry - called immediately before the hrtimer callback * @hrtimer: pointer to struct hrtimer - * @now: pointer to variable which contains current time of the - * timers base. + * @now: variable which contains current time of the timers base. * * Allows to determine the timer latency. */ TRACE_EVENT(hrtimer_expire_entry, =20 - TP_PROTO(struct hrtimer *hrtimer, ktime_t *now), + TP_PROTO(struct hrtimer *hrtimer, ktime_t now), =20 TP_ARGS(hrtimer, now), =20 @@ -273,7 +272,7 @@ TRACE_EVENT(hrtimer_expire_entry, =20 TP_fast_assign( __entry->hrtimer =3D hrtimer; - __entry->now =3D *now; + __entry->now =3D now; __entry->function =3D ACCESS_PRIVATE(hrtimer, function); ), =20 diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 226cac8c82cc..d350bceb3c95 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1884,7 +1884,7 @@ EXPORT_SYMBOL_GPL(hrtimer_active); * __run_hrtimer() invocations. */ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, struct hrtime= r_clock_base *base, - struct hrtimer *timer, ktime_t *now, unsigned long flags) + struct hrtimer *timer, ktime_t now, unsigned long flags) __must_hold(&cpu_base->lock) { enum hrtimer_restart (*fn)(struct hrtimer *); @@ -1989,7 +1989,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_b= ase *cpu_base, ktime_t now, if (basenow < hrtimer_get_softexpires(timer)) break; =20 - __run_hrtimer(cpu_base, base, timer, &basenow, flags); + __run_hrtimer(cpu_base, base, timer, basenow, flags); if (active_mask =3D=3D HRTIMER_ACTIVE_SOFT) hrtimer_sync_wait_running(cpu_base, flags); } --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F2233C9437; Wed, 11 Mar 2026 10:16:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224186; cv=none; b=ehYoVbS/oYVHZxYj/WGS8BZ29rDSigvjeH4ou020y7RIXTAT+T2pd5p1zOqqd9/uakMDN7taL1FhTMMumuZ9eDXUGZpHB/Q+CBmfJRuslYDHWnyhAkD/PaGs9dfkUtUTaO3Xzt2aE5000+RELXxPqlJiYVhkrSKmeXKJl0QRPD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224186; c=relaxed/simple; bh=k2XwGZqPcFVrZtTNRH+HpoPYodLcAgvbSVWzG5oK1II=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HUQNIr6eYva24Wq3Hyc06/G3XmynC0YsdtgrG2x7OLTU86jVl0G9gAzaXG4QksBL5wdQF+9x/7DbOTUkBCKEeZ65bSMnck+Gmrh1RKJziOClTlnDIioTRO5+TGTqGfcoeXt4XzlEfLhXz+W9oDXpQcQVtcmvtnQajHHXDGZbAu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bte7dt1V; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=l+U6z/Nz; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bte7dt1V"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="l+U6z/Nz" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wJRuJckQ+ypso4OXrye4CavrmtHzMV0pbF16GSMCkSI=; b=bte7dt1VD4M43iM8PHbg5cAxzsX+VT3cUXuHmSegfKPw+5mCEgcf5V5LyvHxkUlRdIfC3C SW+SwGjfx32TLAEi27EUh3iY2t0B6xJD1hUSGUMdk/++kgvn6b6uccKwvPrnO2mMSH9Acy guWUNjtsfqLygB8V8dlNugoL7e9RHIp43QlBeneCQPFibu2IJXPU1SQ5py1+8PaaEFaJoz klk5ZLx9r/bn0kf4Nvin+VqIpLwhKB8At8ts5PFFNITxTfVRxxyvyJB1ruOIoxUzLiF1sv R/eIw7j7n2bmPb2kvsmQjH+GJJ3j4q532Fk9F0TiRQ2nXaDuvWNJmac1H2Vm7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wJRuJckQ+ypso4OXrye4CavrmtHzMV0pbF16GSMCkSI=; b=l+U6z/Nz3Z4vWit8W2qAkRfSpeAhBL9+GjC9sx9Qlb8vWXAhPpNTYYkdBXEo5s9rvAQxKZ D9fn7cTH4oGNdpAw== Date: Wed, 11 Mar 2026 11:15:19 +0100 Subject: [PATCH 10/12] hrtimer: Mark index and clockid of clock base as const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-10-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=798; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=k2XwGZqPcFVrZtTNRH+HpoPYodLcAgvbSVWzG5oK1II=; b=gRGoaH/njoXsF22mq9SDR6cCKKbC9OIMEWmXBPwA1Fg4IwaKgZlNb1/pTcFTu+Pnm5ja7VJAy QpPcGMUodXHCqfvh8CCSr8cmebl56qHNiXkEL7fWAQU5pT9hj3wByMq X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= These fields are initialized once and are never supposed to change. Mark them as const to make this explicit. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/linux/hrtimer_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index e6d4dc1b61e0..a03240c0b14f 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -26,8 +26,8 @@ */ struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base; - unsigned int index; - clockid_t clockid; + const unsigned int index; + const clockid_t clockid; seqcount_raw_spinlock_t seq; ktime_t expires_next; struct hrtimer *running; --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E06C3C9443; Wed, 11 Mar 2026 10:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224187; cv=none; b=iKFdvwlr8F4dKbuJ1Kv0EmGNmUVswcYG/wLUdrxctDK9go1FPqyV+3TMFfHth/C5zaWzIp7d7zL7vhDGreHPVZG2N9SKLjYy0QFlZ3a4exoTYPaDuQygJ4/wblcmRjOLfbLAEgADx382CO3UJ4zmUM1Gu7uV+afyhQ7HTXxbcxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224187; c=relaxed/simple; bh=ZJvsYq/9QXH/JBlQi6mWA45F4v47A2sHIptcO3IpxA8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iytyQteoqDrJayURs0FQQOqc2QRogeJ7iSNpsr6eLNBu4oxl63m8LBE/ZSLYCBrXv+aCWH0ngfBqnauypIL4wJxP6ZWdAyrBg0g9KlClhvauWj62tjbQ0vOLhV6pPdsAd0zhL1lcI2ptjN18LKFMiBnrbEnU0Cd97jrXymjYz3w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qZDaR7IS; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AWmISy0K; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qZDaR7IS"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AWmISy0K" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8tY76R/HYHkM6tdxqlr1WrQmWc28Wofr4qsZxpr6vc0=; b=qZDaR7ISn67NH70pv1ReQ2+FkUW+B8c0RPGZ2NqvAsG5pGM2QABhFdIf90lMozDtZRWuHh 4BIiDGyFOdF8Bwgv8mQMkJFY80uV04YuhOj6w7TfC6va0d49Y6ynEe6YIET0mtTR9znIts JNlafL5DuL5c9T2416CAJK/36eMiP984cJTIXAu8TJlPRPkk46W8HA7xBCUQBbIEPFbNwA CmcroV+Ny2uPHWr0rKN6I4XqBguRp0PzuEaYLzuhu6U9DfZUBR/trzJrq7QgsHLLdaugLo PEe6Ql+bfz13+UWQ16WsQWZFgUXqA1OUOJ+Ekn+zO/7J38WU5y9Wdq9JOJtsBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8tY76R/HYHkM6tdxqlr1WrQmWc28Wofr4qsZxpr6vc0=; b=AWmISy0K1Va252rjvZ+6P8Dxzuhj0JOt0uN6/ysb6QEJ/n5xAojX5k0G03jsEK+mil0p7q MmB7Bs2eFNat44BA== Date: Wed, 11 Mar 2026 11:15:20 +0100 Subject: [PATCH 11/12] hrtimer: Remove trailing comma after HRTIMER_MAX_CLOCK_BASES Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-11-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=736; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=ZJvsYq/9QXH/JBlQi6mWA45F4v47A2sHIptcO3IpxA8=; b=LaB39xq/m4WM9sNi6k5h2pJ6QL85D/F0rENYTp+fI1N81Ijya3Rb/vOjUGsm15KXcv+Go388x We8J5rhmSqbAv4eBELEcpuGvfgupcBZEcENc1XX+2BYW9Q2Op+xzVqw X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= HRTIMER_MAX_CLOCK_BASES is required to stay the last value of the enum. Drop the trailing comma so no new members are added after it by mistake. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- include/linux/hrtimer_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index a03240c0b14f..52ed9e46ff13 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -44,7 +44,7 @@ enum hrtimer_base_type { HRTIMER_BASE_REALTIME_SOFT, HRTIMER_BASE_BOOTTIME_SOFT, HRTIMER_BASE_TAI_SOFT, - HRTIMER_MAX_CLOCK_BASES, + HRTIMER_MAX_CLOCK_BASES }; =20 /** --=20 2.53.0 From nobody Tue Apr 7 22:03:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C2A83CEBA0; Wed, 11 Mar 2026 10:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224187; cv=none; b=lSpVlt2OWXz/n0ngHfapxdame6SDskw4W4Eb2lQ2/RaSiqqQlMmb6B3QxRwb1gxivsjhO7nMi6N3zU+f6Gh3lUzuoPxd311Ps0kWww0JpIUDl2koidg2u4EmTVPiaCADR460jR9aoVDS8Wgu/Z3kOgo5OR4z13alEgNu/Hlc70E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224187; c=relaxed/simple; bh=YvXyV7CVpcm/llatxBdUGnPwoonKvKmSxfG6LXdq7ZI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kfNiCTjErdnNrcv698FQ0Y42xRjOVrMGx88fkM7Cj9Z2Yw9NubH3efPEjsvnVwVi9yraP7E5Ue4YEyDgMRAC9/cbdGNsicx5GITvqp593VbPVlYOG3Isl/2twhwwu2DnClYkr40sdr/w5AW4vb9l62HFRggWzGIQWpaq/p2u+7Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pt8ftYDb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6csCQMBI; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pt8ftYDb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6csCQMBI" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773224185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1lqbPdWo5M7xyMGcnFdCdyd/ndaVXfMuzeCyaV6maY=; b=pt8ftYDbhWrhCXfKA4Oa/xg4dtora3Y0ynchr4jNqrUpr30g5GPdeQ/EPSFLdsgTlDBVYm RwH4fISwPDwqHEBZeyZFkInPex6QqUWi1Pwetu8+DB+ob1U5q9oadS8zR8grY0Ns1nbsbR NE5PKFtPfbF3a88/0bV0I1EHE+wKZ1bsqxDld+l9hBx+UrQr/xmAK9spv0a+S7HLD8wLUQ N/pACctXVZUzVqquTGNDlQN4JmjM8TF4Fn8eleu5zIvgXlISDmrs7tSsHu6pIbpCOla4gZ PRfH0f9/6F6RjG4iiXz4s4YwUqETZTnSzEUdgtbU46UXS+uYisVfzkwFRqGb3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773224185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1lqbPdWo5M7xyMGcnFdCdyd/ndaVXfMuzeCyaV6maY=; b=6csCQMBIt93U9Or22QexmVXQUytv8Gj5Q7HnbDrHDliXDFwF6UJ1/tZd5aF8/m+6WC1IRK 1yWNdMLmGhXcXFCQ== Date: Wed, 11 Mar 2026 11:15:21 +0100 Subject: [PATCH 12/12] hrtimer: Add a helper to retrieve a hrtimer from its timerqueue node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260311-hrtimer-cleanups-v1-12-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de> To: Jan Kiszka , Kieran Bingham , John Stultz , Thomas Gleixner , Anna-Maria Behnsen , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Frederic Weisbecker , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773224171; l=2056; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=YvXyV7CVpcm/llatxBdUGnPwoonKvKmSxfG6LXdq7ZI=; b=7txLjQFs4i7aNne4I+4t3O4R9sFRfvSuT1zH4pQNorAGf5+/yedPlMont6LSa2uBEF4/JwSVM vhSApJt1MocBnvl9wgsX/FxKqcXLxkHjAwocVOEoDpQT5El8XeUDRwA X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The container_of() call is open-coded multiple times. Add a helper macro. Use container_of_const() to preserve constness. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) --- kernel/time/hrtimer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index d350bceb3c95..94955f967207 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -534,6 +534,8 @@ static inline void debug_activate(struct hrtimer *timer= , enum hrtimer_mode mode, for (bool done =3D false; !done; active &=3D ~(1U << idx)) \ for (base =3D &cpu_base->clock_base[idx]; !done; done =3D true) =20 +#define hrtimer_from_timerqueue_node(_n) container_of_const(_n, struct hrt= imer, node) + #if defined(CONFIG_NO_HZ_COMMON) /* * Same as hrtimer_bases_next_event() below, but skips the excluded timer = and @@ -578,7 +580,7 @@ static __always_inline struct hrtimer *clock_base_next_= timer(struct hrtimer_cloc { struct timerqueue_linked_node *next =3D timerqueue_linked_first(&base->ac= tive); =20 - return container_of(next, struct hrtimer, node); + return hrtimer_from_timerqueue_node(next); } =20 /* Find the base with the earliest expiry */ @@ -1960,7 +1962,7 @@ static __always_inline struct hrtimer *clock_base_nex= t_timer_safe(struct hrtimer { struct timerqueue_linked_node *next =3D timerqueue_linked_first(&base->ac= tive); =20 - return next ? container_of(next, struct hrtimer, node) : NULL; + return next ? hrtimer_from_timerqueue_node(next) : NULL; } =20 static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_= t now, @@ -2438,7 +2440,7 @@ static void migrate_hrtimer_list(struct hrtimer_clock= _base *old_base, struct hrtimer *timer; =20 while ((node =3D timerqueue_linked_first(&old_base->active))) { - timer =3D container_of(node, struct hrtimer, node); + timer =3D hrtimer_from_timerqueue_node(node); BUG_ON(hrtimer_callback_running(timer)); debug_hrtimer_deactivate(timer); =20 --=20 2.53.0