summaryrefslogtreecommitdiff
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2023-12-01 10:26:32 +0100
committerThomas Gleixner <tglx@linutronix.de>2023-12-20 16:49:38 +0100
commit7a39a5080ef0e3cf233d92165f6a778f08a08244 (patch)
tree607da8e76b1facb0db5bb3704f2a6bfc135cd53e /kernel/time/timer.c
parent1e490484aa3af42d4eeffabf96d6a02be69d586b (diff)
timers: Use already existing function for forwarding timer base
There is an already existing function for forwarding the timer base. Forwarding the timer base is implemented directly in get_next_timer_interrupt() as well. Remove the code duplication and invoke __forward_timer_base() instead. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20231201092654.34614-11-anna-maria@linutronix.de
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 5b02e169ab23..1a73d396101b 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1939,15 +1939,9 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
/*
* We have a fresh next event. Check whether we can forward the
- * base. We can only do that when @basej is past base->clk
- * otherwise we might rewind base->clk.
+ * base.
*/
- if (time_after(basej, base->clk)) {
- if (time_after(nextevt, basej))
- base->clk = basej;
- else if (time_after(nextevt, base->clk))
- base->clk = nextevt;
- }
+ __forward_timer_base(base, basej);
if (time_before_eq(nextevt, basej)) {
expires = basem;