public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clockevents: Reset next_event_forced in the coupled programming path
@ 2026-04-27  9:28 Zhan Xusheng
  2026-04-27 15:08 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Zhan Xusheng @ 2026-04-27  9:28 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, Zhan Xusheng

All successful event programming paths in clockevents_program_event()
reset next_event_forced to zero, except the clockevent_set_next_coupled()
path which was added before the starvation prevention mechanism.

Add the missing reset for consistency.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 kernel/time/clockevents.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 5e22697b098d..ee1a350b9b43 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -357,8 +357,10 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, b
 	if (unlikely(dev->features & CLOCK_EVT_FEAT_HRTIMER))
 		return dev->set_next_ktime(expires, dev);
 
-	if (likely(clockevent_set_next_coupled(dev, expires)))
+	if (likely(clockevent_set_next_coupled(dev, expires))) {
+		dev->next_event_forced = 0;
 		return 0;
+	}
 
 	delta = ktime_to_ns(ktime_sub(expires, ktime_get()));
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-28  2:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27  9:28 [PATCH] clockevents: Reset next_event_forced in the coupled programming path Zhan Xusheng
2026-04-27 15:08 ` Thomas Gleixner
2026-04-28  2:23   ` Zhan Xusheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox