]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
timers: Use __raise_softirq_irqoff() to raise the softirq.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 6 Nov 2024 14:51:38 +0000 (15:51 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 7 Nov 2024 01:44:38 +0000 (02:44 +0100)
Raising the timer soft interrupt is always done from hard interrupt
context, so it can be reduced to just setting the TIMER soft interrupt
flag. The soft interrupt will be invoked on return from interrupt.

Use therefore __raise_softirq_irqoff() to raise the TIMER soft interrupt,
which is a trivial optimization.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/all/20241106150419.2593080-3-bigeasy@linutronix.de
kernel/time/timer.c

index 0fc9d066a7be46a18617b728ca8e0116a51f030e..1759de934284c071dbd5ff0428d3d6ced327657a 100644 (file)
@@ -2499,7 +2499,7 @@ static void run_local_timers(void)
                 */
                if (time_after_eq(jiffies, READ_ONCE(base->next_expiry)) ||
                    (i == BASE_DEF && tmigr_requires_handle_remote())) {
-                       raise_softirq(TIMER_SOFTIRQ);
+                       __raise_softirq_irqoff(TIMER_SOFTIRQ);
                        return;
                }
        }