summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>2025-08-21 16:28:15 +0300
committerThomas Gleixner <tglx@linutronix.de>2025-09-09 13:27:18 +0300
commit009eb5da29a91016e3ebb988e6401e79411be7a1 (patch)
treef95fde5376c6b68c90d8dfa2c106ebcc1b6fe84c /include/linux
parentcdea7cdae26995992a766443e1ea862923f2443d (diff)
downloadlinux-009eb5da29a91016e3ebb988e6401e79411be7a1.tar.xz
hrtimer: Remove hrtimer_clock_base:: Get_time
The get_time() callbacks always need to match the bases clockid. Instead of maintaining that association twice in hrtimer_bases, use a helper. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/all/20250821-hrtimer-cleanup-get_time-v2-8-3ae822e5bfbd@linutronix.de
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hrtimer.h5
-rw-r--r--include/linux/hrtimer_defs.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index e655502b14e6..2cf1bf65b225 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -154,10 +154,7 @@ static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer)
return ktime_to_ns(timer->node.expires);
}
-static inline ktime_t hrtimer_cb_get_time(const struct hrtimer *timer)
-{
- return timer->base->get_time();
-}
+ktime_t hrtimer_cb_get_time(const struct hrtimer *timer);
static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer)
{
diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h
index 84a5045f80f3..aa49ffa130e5 100644
--- a/include/linux/hrtimer_defs.h
+++ b/include/linux/hrtimer_defs.h
@@ -41,7 +41,6 @@
* @seq: seqcount around __run_hrtimer
* @running: pointer to the currently running hrtimer
* @active: red black tree root node for the active timers
- * @get_time: function to retrieve the current time of the clock
* @offset: offset of this clock to the monotonic base
*/
struct hrtimer_clock_base {
@@ -51,7 +50,6 @@ struct hrtimer_clock_base {
seqcount_raw_spinlock_t seq;
struct hrtimer *running;
struct timerqueue_head active;
- ktime_t (*get_time)(void);
ktime_t offset;
} __hrtimer_clock_base_align;