Re: [patch V2 06/11] alarmtimer: Provide alarm_start_timer()

From: Frederic Weisbecker

Date: Fri Apr 10 2026 - 08:54:21 EST


Le Wed, Apr 08, 2026 at 01:54:11PM +0200, Thomas Gleixner a écrit :
> Alarm timers utilize hrtimers for normal operation and only switch to the
> RTC on suspend. In order to catch already expired timers early and without
> going through a timer interrupt cycle, provide a new start function which
> internally uses hrtimer_start_range_ns_user().
>
> If hrtimer_start_range_ns_user() detects an already expired timer, it does
> not queue it. In that case remove the timer from the alarm base as well.
>
> Return the status queued or not back to the caller to handle the early
> expiry.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Acked-by: John Stultz <jstultz@xxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxx>

Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

--
Frederic Weisbecker
SUSE Labs