* [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
* Re: [PATCH] clockevents: Reset next_event_forced in the coupled programming path
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
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2026-04-27 15:08 UTC (permalink / raw)
To: Zhan Xusheng; +Cc: linux-kernel, Zhan Xusheng
On Mon, Apr 27 2026 at 17:28, Zhan Xusheng wrote:
> 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.
What for?
It never reaches the point where it sets or checks that
next_event_forced bit.
Your AI slop is clearly not getting it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clockevents: Reset next_event_forced in the coupled programming path
2026-04-27 15:08 ` Thomas Gleixner
@ 2026-04-28 2:23 ` Zhan Xusheng
0 siblings, 0 replies; 3+ messages in thread
From: Zhan Xusheng @ 2026-04-28 2:23 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Zhan Xusheng, linux-kernel
On Mon, 27 Apr 2026 at 17:08, Thomas Gleixner <tglx@kernel.org> wrote:
> What for?
>
> It never reaches the point where it sets or checks that
> next_event_forced bit.
You're right. Devices using the coupled path never reach the code
which sets or checks next_event_forced, so this reset is dead code.
Sorry for the noise.
Zhan Xusheng
^ permalink raw reply [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