Skip to content

Commit 7a7f506

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
hrtimer: Use __raise_softirq_irqoff() to raise the softirq
Raising the hrtimer soft interrupt is always done from hard interrupt context, so it can be reduced to just setting the HRTIMER soft interrupt flag. The soft interrupt will be invoked on return from interrupt. Use therefore __raise_softirq_irqoff() to raise the HRTIMER soft interrupt, which is a trivial optimization. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 6da3356 commit 7a7f506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/time/hrtimer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ void hrtimer_interrupt(struct clock_event_device *dev)
18111811
if (!ktime_before(now, cpu_base->softirq_expires_next)) {
18121812
cpu_base->softirq_expires_next = KTIME_MAX;
18131813
cpu_base->softirq_activated = 1;
1814-
raise_softirq_irqoff(HRTIMER_SOFTIRQ);
1814+
__raise_softirq_irqoff(HRTIMER_SOFTIRQ);
18151815
}
18161816

18171817
__hrtimer_run_queues(cpu_base, now, flags, HRTIMER_ACTIVE_HARD);
@@ -1906,7 +1906,7 @@ void hrtimer_run_queues(void)
19061906
if (!ktime_before(now, cpu_base->softirq_expires_next)) {
19071907
cpu_base->softirq_expires_next = KTIME_MAX;
19081908
cpu_base->softirq_activated = 1;
1909-
raise_softirq_irqoff(HRTIMER_SOFTIRQ);
1909+
__raise_softirq_irqoff(HRTIMER_SOFTIRQ);
19101910
}
19111911

19121912
__hrtimer_run_queues(cpu_base, now, flags, HRTIMER_ACTIVE_HARD);

0 commit comments

Comments
 (0)