* [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h
@ 2026-07-02 9:41 Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
` (7 more replies)
0 siblings, 8 replies; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:41 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
Currently the hrtimer base structure definitions are included from the
widely used linux/hrtimer.h header.
Any change to the base structures will trigger a nearly full rebuild.
That inclusion is not really necessary as nearly no user needs the base
bits anyways.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (Schneider Electric) (8):
hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h
hrtimer: Move hrtimer_callback_running() to hrtimer_bases.h
hrtimer: Move hrtimer_update_function() to hrtimer.c
tick: Explicitly include linux/hrtimer_bases.h
hrtimer: Explicitly include linux/hrtimer_bases.h
hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h
x86/speculation: Explicitly include linux/types.h
hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h
arch/x86/include/asm/nospec-branch.h | 1 +
include/linux/hrtimer.h | 34 ++---------------------
include/linux/{hrtimer_defs.h => hrtimer_bases.h} | 14 ++++++++--
include/linux/hrtimer_rearm.h | 5 ++++
kernel/sched/fair.c | 2 ++
kernel/time/hrtimer.c | 25 +++++++++++++++++
kernel/time/tick-internal.h | 1 +
sound/drivers/dummy.c | 1 +
8 files changed, 49 insertions(+), 34 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260626-hrtimer-header-dependencies-5a7d2ddff43f
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:41 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 2/8] hrtimer: Move hrtimer_callback_running() " Thomas Weißschuh (Schneider Electric)
` (6 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:41 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
This header was originally added for #defines and was later extended
with the hrtimer base structures. All the #defines have been removed
in the meantime, so the naming is off now.
Rename the header to fit its contents more.
This will also make the upcoming addition of some functions nicer.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 2 +-
| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 6862dea0acc5..8aa58520a816 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -12,7 +12,7 @@
#ifndef _LINUX_HRTIMER_H
#define _LINUX_HRTIMER_H
-#include <linux/hrtimer_defs.h>
+#include <linux/hrtimer_bases.h>
#include <linux/hrtimer_rearm.h>
#include <linux/hrtimer_types.h>
#include <linux/init.h>
--git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_bases.h
similarity index 98%
rename from include/linux/hrtimer_defs.h
rename to include/linux/hrtimer_bases.h
index 52ed9e46ff13..8c10f45dc469 100644
--- a/include/linux/hrtimer_defs.h
+++ b/include/linux/hrtimer_bases.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_HRTIMER_DEFS_H
-#define _LINUX_HRTIMER_DEFS_H
+#ifndef _LINUX_HRTIMER_BASES_H
+#define _LINUX_HRTIMER_BASES_H
#include <linux/ktime.h>
#include <linux/timerqueue.h>
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/8] hrtimer: Move hrtimer_callback_running() to hrtimer_bases.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:41 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 3/8] hrtimer: Move hrtimer_update_function() to hrtimer.c Thomas Weißschuh (Schneider Electric)
` (5 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:41 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
The usage of the hrtimer base introduces a dependency on the timer base
structure definitions from the widely-used hrtimer.h.
Move the helper to hrtimer_bases.h to trim this dependency.
Also adapt the two only callers to now include hrtimer_bases.h.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 9 ---------
| 10 ++++++++++
| 2 ++
| 1 +
4 files changed, 13 insertions(+), 9 deletions(-)
--git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8aa58520a816..7bf154cf3079 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -287,15 +287,6 @@ static inline bool hrtimer_is_queued(struct hrtimer *timer)
return READ_ONCE(timer->is_queued);
}
-/*
- * Helper function to check, whether the timer is running the callback
- * function
- */
-static inline int hrtimer_callback_running(struct hrtimer *timer)
-{
- return timer->base->running == timer;
-}
-
/**
* hrtimer_update_function - Update the timer's callback function
* @timer: Timer to update
--git a/include/linux/hrtimer_bases.h b/include/linux/hrtimer_bases.h
index 8c10f45dc469..70b99e651168 100644
--- a/include/linux/hrtimer_bases.h
+++ b/include/linux/hrtimer_bases.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_HRTIMER_BASES_H
#define _LINUX_HRTIMER_BASES_H
+#include <linux/hrtimer.h>
#include <linux/ktime.h>
#include <linux/timerqueue.h>
#include <linux/seqlock.h>
@@ -110,4 +111,13 @@ struct hrtimer_cpu_base {
} ____cacheline_aligned;
+/*
+ * Helper function to check, whether the timer is running the callback
+ * function
+ */
+static inline int hrtimer_callback_running(struct hrtimer *timer)
+{
+ return timer->base->running == timer;
+}
+
#endif
--git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d78467ec6ee1..09197f8e4b76 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -26,6 +26,8 @@
#include <linux/jiffies.h>
#include <linux/mm_api.h>
#include <linux/highmem.h>
+#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/spinlock_api.h>
#include <linux/cpumask_api.h>
#include <linux/lockdep_api.h>
--git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 7283f0f18813..ce7ab986dee6 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -13,6 +13,7 @@
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <sound/core.h>
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/8] hrtimer: Move hrtimer_update_function() to hrtimer.c
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 2/8] hrtimer: Move hrtimer_callback_running() " Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 4/8] tick: Explicitly include linux/hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
` (4 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
The usage of the timer base forces hrtimer.h to also expose the base
structure definitions.
Move the function to hrtimer.c to avoid this.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 24 ++----------------------
| 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 22 deletions(-)
--git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 7bf154cf3079..81ab9849e83b 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -287,28 +287,8 @@ static inline bool hrtimer_is_queued(struct hrtimer *timer)
return READ_ONCE(timer->is_queued);
}
-/**
- * hrtimer_update_function - Update the timer's callback function
- * @timer: Timer to update
- * @function: New callback function
- *
- * Only safe to call if the timer is not enqueued. Can be called in the callback function if the
- * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED).
- */
-static inline void hrtimer_update_function(struct hrtimer *timer,
- enum hrtimer_restart (*function)(struct hrtimer *))
-{
-#ifdef CONFIG_PROVE_LOCKING
- guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock);
-
- if (WARN_ON_ONCE(hrtimer_is_queued(timer)))
- return;
-
- if (WARN_ON_ONCE(!function))
- return;
-#endif
- ACCESS_PRIVATE(timer, function) = function;
-}
+void hrtimer_update_function(struct hrtimer *timer,
+ enum hrtimer_restart (*function)(struct hrtimer *));
/* Forward a hrtimer so it expires after now: */
extern u64
--git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 313dcea127fe..31d09bc84ed7 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1039,6 +1039,30 @@ static inline void unlock_hrtimer_base(const struct hrtimer *timer, unsigned lon
raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags);
}
+/**
+ * hrtimer_update_function - Update the timer's callback function
+ * @timer: Timer to update
+ * @function: New callback function
+ *
+ * Only safe to call if the timer is not enqueued. Can be called in the callback function if the
+ * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED).
+ */
+void hrtimer_update_function(struct hrtimer *timer,
+ enum hrtimer_restart (*function)(struct hrtimer *))
+{
+#ifdef CONFIG_PROVE_LOCKING
+ guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock);
+
+ if (WARN_ON_ONCE(hrtimer_is_queued(timer)))
+ return;
+
+ if (WARN_ON_ONCE(!function))
+ return;
+#endif
+ ACCESS_PRIVATE(timer, function) = function;
+}
+EXPORT_SYMBOL_GPL(hrtimer_update_function);
+
/**
* hrtimer_forward() - forward the timer expiry
* @timer: hrtimer to forward
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 4/8] tick: Explicitly include linux/hrtimer_bases.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
` (2 preceding siblings ...)
2026-07-02 9:42 ` [PATCH 3/8] hrtimer: Move hrtimer_update_function() to hrtimer.c Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 5/8] hrtimer: " Thomas Weißschuh (Schneider Electric)
` (3 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
This header uses some definitions from linux/hrtimer_bases.h.
Currently this header is included transitively, which will change.
Include the header explicitly.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 597d816d22e8..182974c4f21b 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -3,6 +3,7 @@
* tick internal variable and functions used by low/high res code
*/
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/tick.h>
#include "timekeeping.h"
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/8] hrtimer: Explicitly include linux/hrtimer_bases.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
` (3 preceding siblings ...)
2026-07-02 9:42 ` [PATCH 4/8] tick: Explicitly include linux/hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 6/8] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h Thomas Weißschuh (Schneider Electric)
` (2 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
This header uses some definitions from linux/hrtimer_bases.h.
Currently this header is included transitively, which will change.
Include the header explicitly.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 31d09bc84ed7..13a4436a65f5 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -26,6 +26,7 @@
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/notifier.h>
#include <linux/syscalls.h>
#include <linux/interrupt.h>
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 6/8] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
` (4 preceding siblings ...)
2026-07-02 9:42 ` [PATCH 5/8] hrtimer: " Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 7/8] x86/speculation: Explicitly include linux/types.h Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 8/8] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h Thomas Weißschuh (Schneider Electric)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
Multiple used types and symbols are only visible through transitive
dependency chains.
Include the headers explicitly as those chains are going to go away.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 5 +++++
1 file changed, 5 insertions(+)
--git a/include/linux/hrtimer_rearm.h b/include/linux/hrtimer_rearm.h
index a6f2e5d5e1c7..17a81826bd9a 100644
--- a/include/linux/hrtimer_rearm.h
+++ b/include/linux/hrtimer_rearm.h
@@ -2,7 +2,12 @@
#ifndef _LINUX_HRTIMER_REARM_H
#define _LINUX_HRTIMER_REARM_H
+#include <linux/types.h>
+
#ifdef CONFIG_HRTIMER_REARM_DEFERRED
+#include <linux/irqflags.h>
+#include <linux/lockdep.h>
+#include <linux/preempt.h>
#include <linux/thread_info.h>
void __hrtimer_rearm_deferred(void);
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 7/8] x86/speculation: Explicitly include linux/types.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
` (5 preceding siblings ...)
2026-07-02 9:42 ` [PATCH 6/8] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 8/8] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h Thomas Weißschuh (Schneider Electric)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
The usage of 'bool' requires linux/types.h, which is currently only
included through a transitive dependency chain.
Include linux/types.h as that chain is going to go away.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 4f4b5e8a1574..6734203595fe 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -6,6 +6,7 @@
#include <linux/static_key.h>
#include <linux/objtool.h>
#include <linux/linkage.h>
+#include <linux/types.h>
#include <asm/alternative.h>
#include <asm/cpufeatures.h>
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 8/8] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
` (6 preceding siblings ...)
2026-07-02 9:42 ` [PATCH 7/8] x86/speculation: Explicitly include linux/types.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-02 9:42 ` Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
7 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh (Schneider Electric) @ 2026-07-02 9:42 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: linux-kernel, Thomas Weißschuh (Schneider Electric)
hrtimer.h is used all over the kernel. Any change to hrtimer_bases.h
effectively triggers a full rebuild.
As all logical dependencies from hrtimer.h to hrtimer_bases.h have been
removed, the inclusion is now unncessary. Remove it.
Fix up some other files which happen to rely some transitive inclusions.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
| 1 -
1 file changed, 1 deletion(-)
--git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 81ab9849e83b..29072d89e5cb 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -12,7 +12,6 @@
#ifndef _LINUX_HRTIMER_H
#define _LINUX_HRTIMER_H
-#include <linux/hrtimer_bases.h>
#include <linux/hrtimer_rearm.h>
#include <linux/hrtimer_types.h>
#include <linux/init.h>
--
2.55.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h
2026-07-02 9:42 ` [PATCH 8/8] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: faef65e45a2a03f1fa32bc4e55c11d79f6aaae6f
Gitweb: https://git.kernel.org/tip/faef65e45a2a03f1fa32bc4e55c11d79f6aaae6f
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:05 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:45 +02:00
hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h
hrtimer.h is used all over the kernel. Any change to hrtimer_bases.h
effectively triggers a full rebuild.
As all logical dependencies from hrtimer.h to hrtimer_bases.h have been
removed, the inclusion is now unncessary. Remove it.
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/20260702-hrtimer-header-dependencies-v1-8-c50b19bda473@linutronix.de
---
include/linux/hrtimer.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 81ab984..29072d8 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -12,7 +12,6 @@
#ifndef _LINUX_HRTIMER_H
#define _LINUX_HRTIMER_H
-#include <linux/hrtimer_bases.h>
#include <linux/hrtimer_rearm.h>
#include <linux/hrtimer_types.h>
#include <linux/init.h>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] x86/speculation: Explicitly include linux/types.h
2026-07-02 9:42 ` [PATCH 7/8] x86/speculation: Explicitly include linux/types.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 0c31af3d23e62b2ac0622bc6592793e21f915657
Gitweb: https://git.kernel.org/tip/0c31af3d23e62b2ac0622bc6592793e21f915657
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:04 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:45 +02:00
x86/speculation: Explicitly include linux/types.h
The usage of 'bool' requires linux/types.h, which is currently only
included through a transitive dependency chain.
Include linux/types.h as that chain is going to go away.
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/20260702-hrtimer-header-dependencies-v1-7-c50b19bda473@linutronix.de
---
arch/x86/include/asm/nospec-branch.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 4f4b5e8..6734203 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -6,6 +6,7 @@
#include <linux/static_key.h>
#include <linux/objtool.h>
#include <linux/linkage.h>
+#include <linux/types.h>
#include <asm/alternative.h>
#include <asm/cpufeatures.h>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h
2026-07-02 9:42 ` [PATCH 6/8] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 071993aac72ea8e6f9986bf41101974e8faa2eca
Gitweb: https://git.kernel.org/tip/071993aac72ea8e6f9986bf41101974e8faa2eca
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:03 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:45 +02:00
hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h
Multiple used types and symbols are only visible through transitive
dependency chains.
Include the headers explicitly as those chains are going to go away.
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/20260702-hrtimer-header-dependencies-v1-6-c50b19bda473@linutronix.de
---
include/linux/hrtimer_rearm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/hrtimer_rearm.h b/include/linux/hrtimer_rearm.h
index a6f2e5d..17a8182 100644
--- a/include/linux/hrtimer_rearm.h
+++ b/include/linux/hrtimer_rearm.h
@@ -2,7 +2,12 @@
#ifndef _LINUX_HRTIMER_REARM_H
#define _LINUX_HRTIMER_REARM_H
+#include <linux/types.h>
+
#ifdef CONFIG_HRTIMER_REARM_DEFERRED
+#include <linux/irqflags.h>
+#include <linux/lockdep.h>
+#include <linux/preempt.h>
#include <linux/thread_info.h>
void __hrtimer_rearm_deferred(void);
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Explicitly include linux/hrtimer_bases.h
2026-07-02 9:42 ` [PATCH 5/8] hrtimer: " Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 95cf8bbadd103944c35c55e8c4cb85fa9a4ae84b
Gitweb: https://git.kernel.org/tip/95cf8bbadd103944c35c55e8c4cb85fa9a4ae84b
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:02 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00
hrtimer: Explicitly include linux/hrtimer_bases.h
This header uses some definitions from linux/hrtimer_bases.h.
Currently this header is included transitively, which will change.
Include the header explicitly.
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/20260702-hrtimer-header-dependencies-v1-5-c50b19bda473@linutronix.de
---
kernel/time/hrtimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 0ac8899..01890b7 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -26,6 +26,7 @@
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/notifier.h>
#include <linux/syscalls.h>
#include <linux/interrupt.h>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] tick: Explicitly include linux/hrtimer_bases.h
2026-07-02 9:42 ` [PATCH 4/8] tick: Explicitly include linux/hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 73fcec09d1629afa8819a866518cc0e8d58a7ece
Gitweb: https://git.kernel.org/tip/73fcec09d1629afa8819a866518cc0e8d58a7ece
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:01 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00
tick: Explicitly include linux/hrtimer_bases.h
This header uses some definitions from linux/hrtimer_bases.h.
Currently this header is included transitively, which will change.
Include the header explicitly.
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/20260702-hrtimer-header-dependencies-v1-4-c50b19bda473@linutronix.de
---
kernel/time/tick-internal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 597d816..182974c 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -3,6 +3,7 @@
* tick internal variable and functions used by low/high res code
*/
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/tick.h>
#include "timekeeping.h"
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Move hrtimer_update_function() to hrtimer.c
2026-07-02 9:42 ` [PATCH 3/8] hrtimer: Move hrtimer_update_function() to hrtimer.c Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: a116c7582d7f7701736801a47e3432eb7cabd674
Gitweb: https://git.kernel.org/tip/a116c7582d7f7701736801a47e3432eb7cabd674
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:42:00 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00
hrtimer: Move hrtimer_update_function() to hrtimer.c
The usage of the hrtimer base forces hrtimer.h to also expose the base
structure definitions.
Move the function to hrtimer.c to avoid this.
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/20260702-hrtimer-header-dependencies-v1-3-c50b19bda473@linutronix.de
---
include/linux/hrtimer.h | 24 ++----------------------
kernel/time/hrtimer.c | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 7bf154c..81ab984 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -287,28 +287,8 @@ static inline bool hrtimer_is_queued(struct hrtimer *timer)
return READ_ONCE(timer->is_queued);
}
-/**
- * hrtimer_update_function - Update the timer's callback function
- * @timer: Timer to update
- * @function: New callback function
- *
- * Only safe to call if the timer is not enqueued. Can be called in the callback function if the
- * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED).
- */
-static inline void hrtimer_update_function(struct hrtimer *timer,
- enum hrtimer_restart (*function)(struct hrtimer *))
-{
-#ifdef CONFIG_PROVE_LOCKING
- guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock);
-
- if (WARN_ON_ONCE(hrtimer_is_queued(timer)))
- return;
-
- if (WARN_ON_ONCE(!function))
- return;
-#endif
- ACCESS_PRIVATE(timer, function) = function;
-}
+void hrtimer_update_function(struct hrtimer *timer,
+ enum hrtimer_restart (*function)(struct hrtimer *));
/* Forward a hrtimer so it expires after now: */
extern u64
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 697816d..0ac8899 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1040,6 +1040,30 @@ static inline void unlock_hrtimer_base(const struct hrtimer *timer, unsigned lon
}
/**
+ * hrtimer_update_function - Update the timer's callback function
+ * @timer: Timer to update
+ * @function: New callback function
+ *
+ * Only safe to call if the timer is not enqueued. Can be called in the callback function if the
+ * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED).
+ */
+void hrtimer_update_function(struct hrtimer *timer,
+ enum hrtimer_restart (*function)(struct hrtimer *))
+{
+#ifdef CONFIG_PROVE_LOCKING
+ guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock);
+
+ if (WARN_ON_ONCE(hrtimer_is_queued(timer)))
+ return;
+
+ if (WARN_ON_ONCE(!function))
+ return;
+#endif
+ ACCESS_PRIVATE(timer, function) = function;
+}
+EXPORT_SYMBOL_GPL(hrtimer_update_function);
+
+/**
* hrtimer_forward() - forward the timer expiry
* @timer: hrtimer to forward
* @now: forward past this time
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Move hrtimer_callback_running() to hrtimer_bases.h
2026-07-02 9:41 ` [PATCH 2/8] hrtimer: Move hrtimer_callback_running() " Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d3dc7fabd4c4a3baaa7e7bfa84558fedad699580
Gitweb: https://git.kernel.org/tip/d3dc7fabd4c4a3baaa7e7bfa84558fedad699580
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:41:59 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00
hrtimer: Move hrtimer_callback_running() to hrtimer_bases.h
The usage of the hrtimer base introduces a dependency on the timer base
structure definitions from the widely-used hrtimer.h.
Move the helper to hrtimer_bases.h to trim this dependency.
Also adapt the two only callers to now include hrtimer_bases.h.
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/20260702-hrtimer-header-dependencies-v1-2-c50b19bda473@linutronix.de
---
include/linux/hrtimer.h | 9 ---------
include/linux/hrtimer_bases.h | 10 ++++++++++
kernel/sched/fair.c | 2 ++
sound/drivers/dummy.c | 1 +
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8aa5852..7bf154c 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -287,15 +287,6 @@ static inline bool hrtimer_is_queued(struct hrtimer *timer)
return READ_ONCE(timer->is_queued);
}
-/*
- * Helper function to check, whether the timer is running the callback
- * function
- */
-static inline int hrtimer_callback_running(struct hrtimer *timer)
-{
- return timer->base->running == timer;
-}
-
/**
* hrtimer_update_function - Update the timer's callback function
* @timer: Timer to update
diff --git a/include/linux/hrtimer_bases.h b/include/linux/hrtimer_bases.h
index 8c10f45..70b99e6 100644
--- a/include/linux/hrtimer_bases.h
+++ b/include/linux/hrtimer_bases.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_HRTIMER_BASES_H
#define _LINUX_HRTIMER_BASES_H
+#include <linux/hrtimer.h>
#include <linux/ktime.h>
#include <linux/timerqueue.h>
#include <linux/seqlock.h>
@@ -110,4 +111,13 @@ struct hrtimer_cpu_base {
} ____cacheline_aligned;
+/*
+ * Helper function to check, whether the timer is running the callback
+ * function
+ */
+static inline int hrtimer_callback_running(struct hrtimer *timer)
+{
+ return timer->base->running == timer;
+}
+
#endif
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d78467e..09197f8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -26,6 +26,8 @@
#include <linux/jiffies.h>
#include <linux/mm_api.h>
#include <linux/highmem.h>
+#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/spinlock_api.h>
#include <linux/cpumask_api.h>
#include <linux/lockdep_api.h>
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 7283f0f..ce7ab98 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -13,6 +13,7 @@
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/hrtimer.h>
+#include <linux/hrtimer_bases.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <sound/core.h>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [tip: timers/core] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h
2026-07-02 9:41 ` [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
@ 2026-07-07 21:49 ` tip-bot2 for Thomas Weißschuh (Schneider Electric)
0 siblings, 0 replies; 17+ messages in thread
From: tip-bot2 for Thomas Weißschuh (Schneider Electric) @ 2026-07-07 21:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: thomas.weissschuh, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 03b5d4c2798234d9ee3c4a719a2fefe785a6aec4
Gitweb: https://git.kernel.org/tip/03b5d4c2798234d9ee3c4a719a2fefe785a6aec4
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate: Thu, 02 Jul 2026 11:41:58 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00
hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h
This header was originally added for #defines and was later extended
with the hrtimer base structures. All the #defines have been removed
in the meantime, so the naming is off now.
Rename the header to fit its contents more.
This will also make the upcoming addition of some functions nicer.
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/20260702-hrtimer-header-dependencies-v1-1-c50b19bda473@linutronix.de
---
include/linux/hrtimer.h | 2 +-
include/linux/hrtimer_bases.h | 113 +++++++++++++++++++++++++++++++++-
include/linux/hrtimer_defs.h | 113 +---------------------------------
3 files changed, 114 insertions(+), 114 deletions(-)
create mode 100644 include/linux/hrtimer_bases.h
delete mode 100644 include/linux/hrtimer_defs.h
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 6862dea..8aa5852 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -12,7 +12,7 @@
#ifndef _LINUX_HRTIMER_H
#define _LINUX_HRTIMER_H
-#include <linux/hrtimer_defs.h>
+#include <linux/hrtimer_bases.h>
#include <linux/hrtimer_rearm.h>
#include <linux/hrtimer_types.h>
#include <linux/init.h>
diff --git a/include/linux/hrtimer_bases.h b/include/linux/hrtimer_bases.h
new file mode 100644
index 0000000..8c10f45
--- /dev/null
+++ b/include/linux/hrtimer_bases.h
@@ -0,0 +1,113 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_HRTIMER_BASES_H
+#define _LINUX_HRTIMER_BASES_H
+
+#include <linux/ktime.h>
+#include <linux/timerqueue.h>
+#include <linux/seqlock.h>
+
+#ifdef CONFIG_64BIT
+# define __hrtimer_clock_base_align ____cacheline_aligned
+#else
+# define __hrtimer_clock_base_align
+#endif
+
+/**
+ * struct hrtimer_clock_base - the timer base for a specific clock
+ * @cpu_base: per cpu clock base
+ * @index: clock type index for per_cpu support when moving a
+ * timer to a base on another cpu.
+ * @clockid: clock id for per_cpu support
+ * @seq: seqcount around __run_hrtimer
+ * @expires_next: Absolute time of the next event in this clock base
+ * @running: pointer to the currently running hrtimer
+ * @active: red black tree root node for the active timers
+ * @offset: offset of this clock to the monotonic base
+ */
+struct hrtimer_clock_base {
+ struct hrtimer_cpu_base *cpu_base;
+ const unsigned int index;
+ const clockid_t clockid;
+ seqcount_raw_spinlock_t seq;
+ ktime_t expires_next;
+ struct hrtimer *running;
+ struct timerqueue_linked_head active;
+ ktime_t offset;
+} __hrtimer_clock_base_align;
+
+enum hrtimer_base_type {
+ HRTIMER_BASE_MONOTONIC,
+ HRTIMER_BASE_REALTIME,
+ HRTIMER_BASE_BOOTTIME,
+ HRTIMER_BASE_TAI,
+ HRTIMER_BASE_MONOTONIC_SOFT,
+ HRTIMER_BASE_REALTIME_SOFT,
+ HRTIMER_BASE_BOOTTIME_SOFT,
+ HRTIMER_BASE_TAI_SOFT,
+ HRTIMER_MAX_CLOCK_BASES
+};
+
+/**
+ * struct hrtimer_cpu_base - the per cpu clock bases
+ * @lock: lock protecting the base and associated clock bases and timers
+ * @cpu: cpu number
+ * @active_bases: Bitfield to mark bases with active timers
+ * @clock_was_set_seq: Sequence counter of clock was set events
+ * @hres_active: State of high resolution mode
+ * @deferred_rearm: A deferred rearm is pending
+ * @deferred_needs_update: The deferred rearm must re-evaluate the first timer
+ * @hang_detected: The last hrtimer interrupt detected a hang
+ * @softirq_activated: displays, if the softirq is raised - update of softirq
+ * related settings is not required then.
+ * @nr_events: Total number of hrtimer interrupt events
+ * @nr_retries: Total number of hrtimer interrupt retries
+ * @nr_hangs: Total number of hrtimer interrupt hangs
+ * @max_hang_time: Maximum time spent in hrtimer_interrupt
+ * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are expired
+ * @online: CPU is online from an hrtimers point of view
+ * @timer_waiters: A hrtimer_cancel() waiters for the timer callback to finish.
+ * @expires_next: Absolute time of the next event, is required for remote
+ * hrtimer enqueue; it is the total first expiry time (hard
+ * and soft hrtimer are taken into account)
+ * @next_timer: Pointer to the first expiring timer
+ * @softirq_expires_next: Time to check, if soft queues needs also to be expired
+ * @softirq_next_timer: Pointer to the first expiring softirq based timer
+ * @deferred_expires_next: Cached expires next value for deferred rearm
+ * @clock_base: Array of clock bases for this cpu
+ *
+ * Note: next_timer is just an optimization for __remove_hrtimer().
+ * Do not dereference the pointer because it is not reliable on
+ * cross cpu removals.
+ */
+struct hrtimer_cpu_base {
+ raw_spinlock_t lock;
+ unsigned int cpu;
+ unsigned int active_bases;
+ unsigned int clock_was_set_seq;
+ bool hres_active;
+ bool deferred_rearm;
+ bool deferred_needs_update;
+ bool hang_detected;
+ bool softirq_activated;
+ bool online;
+#ifdef CONFIG_HIGH_RES_TIMERS
+ unsigned int nr_events;
+ unsigned short nr_retries;
+ unsigned short nr_hangs;
+ unsigned int max_hang_time;
+#endif
+#ifdef CONFIG_PREEMPT_RT
+ spinlock_t softirq_expiry_lock;
+ atomic_t timer_waiters;
+#endif
+ ktime_t expires_next;
+ struct hrtimer *next_timer;
+ ktime_t softirq_expires_next;
+ struct hrtimer *softirq_next_timer;
+ ktime_t deferred_expires_next;
+ struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
+ call_single_data_t csd;
+} ____cacheline_aligned;
+
+
+#endif
diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h
deleted file mode 100644
index 52ed9e4..0000000
--- a/include/linux/hrtimer_defs.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_HRTIMER_DEFS_H
-#define _LINUX_HRTIMER_DEFS_H
-
-#include <linux/ktime.h>
-#include <linux/timerqueue.h>
-#include <linux/seqlock.h>
-
-#ifdef CONFIG_64BIT
-# define __hrtimer_clock_base_align ____cacheline_aligned
-#else
-# define __hrtimer_clock_base_align
-#endif
-
-/**
- * struct hrtimer_clock_base - the timer base for a specific clock
- * @cpu_base: per cpu clock base
- * @index: clock type index for per_cpu support when moving a
- * timer to a base on another cpu.
- * @clockid: clock id for per_cpu support
- * @seq: seqcount around __run_hrtimer
- * @expires_next: Absolute time of the next event in this clock base
- * @running: pointer to the currently running hrtimer
- * @active: red black tree root node for the active timers
- * @offset: offset of this clock to the monotonic base
- */
-struct hrtimer_clock_base {
- struct hrtimer_cpu_base *cpu_base;
- const unsigned int index;
- const clockid_t clockid;
- seqcount_raw_spinlock_t seq;
- ktime_t expires_next;
- struct hrtimer *running;
- struct timerqueue_linked_head active;
- ktime_t offset;
-} __hrtimer_clock_base_align;
-
-enum hrtimer_base_type {
- HRTIMER_BASE_MONOTONIC,
- HRTIMER_BASE_REALTIME,
- HRTIMER_BASE_BOOTTIME,
- HRTIMER_BASE_TAI,
- HRTIMER_BASE_MONOTONIC_SOFT,
- HRTIMER_BASE_REALTIME_SOFT,
- HRTIMER_BASE_BOOTTIME_SOFT,
- HRTIMER_BASE_TAI_SOFT,
- HRTIMER_MAX_CLOCK_BASES
-};
-
-/**
- * struct hrtimer_cpu_base - the per cpu clock bases
- * @lock: lock protecting the base and associated clock bases and timers
- * @cpu: cpu number
- * @active_bases: Bitfield to mark bases with active timers
- * @clock_was_set_seq: Sequence counter of clock was set events
- * @hres_active: State of high resolution mode
- * @deferred_rearm: A deferred rearm is pending
- * @deferred_needs_update: The deferred rearm must re-evaluate the first timer
- * @hang_detected: The last hrtimer interrupt detected a hang
- * @softirq_activated: displays, if the softirq is raised - update of softirq
- * related settings is not required then.
- * @nr_events: Total number of hrtimer interrupt events
- * @nr_retries: Total number of hrtimer interrupt retries
- * @nr_hangs: Total number of hrtimer interrupt hangs
- * @max_hang_time: Maximum time spent in hrtimer_interrupt
- * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are expired
- * @online: CPU is online from an hrtimers point of view
- * @timer_waiters: A hrtimer_cancel() waiters for the timer callback to finish.
- * @expires_next: Absolute time of the next event, is required for remote
- * hrtimer enqueue; it is the total first expiry time (hard
- * and soft hrtimer are taken into account)
- * @next_timer: Pointer to the first expiring timer
- * @softirq_expires_next: Time to check, if soft queues needs also to be expired
- * @softirq_next_timer: Pointer to the first expiring softirq based timer
- * @deferred_expires_next: Cached expires next value for deferred rearm
- * @clock_base: Array of clock bases for this cpu
- *
- * Note: next_timer is just an optimization for __remove_hrtimer().
- * Do not dereference the pointer because it is not reliable on
- * cross cpu removals.
- */
-struct hrtimer_cpu_base {
- raw_spinlock_t lock;
- unsigned int cpu;
- unsigned int active_bases;
- unsigned int clock_was_set_seq;
- bool hres_active;
- bool deferred_rearm;
- bool deferred_needs_update;
- bool hang_detected;
- bool softirq_activated;
- bool online;
-#ifdef CONFIG_HIGH_RES_TIMERS
- unsigned int nr_events;
- unsigned short nr_retries;
- unsigned short nr_hangs;
- unsigned int max_hang_time;
-#endif
-#ifdef CONFIG_PREEMPT_RT
- spinlock_t softirq_expiry_lock;
- atomic_t timer_waiters;
-#endif
- ktime_t expires_next;
- struct hrtimer *next_timer;
- ktime_t softirq_expires_next;
- struct hrtimer *softirq_next_timer;
- ktime_t deferred_expires_next;
- struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
- call_single_data_t csd;
-} ____cacheline_aligned;
-
-
-#endif
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-07-07 21:49 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 9:41 [PATCH 0/8] hrtimer: Untangle base definitions from hrtimer.h Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 1/8] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:41 ` [PATCH 2/8] hrtimer: Move hrtimer_callback_running() " Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 3/8] hrtimer: Move hrtimer_update_function() to hrtimer.c Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 4/8] tick: Explicitly include linux/hrtimer_bases.h Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 5/8] hrtimer: " Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 6/8] hrtimer: Explicitly include some necessary headers in hrtimer_rearm.h Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 7/8] x86/speculation: Explicitly include linux/types.h Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-02 9:42 ` [PATCH 8/8] hrtimer: Remove inclusion of hrtimer_bases.h remove from hrtimer.h Thomas Weißschuh (Schneider Electric)
2026-07-07 21:49 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
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®