Re: [PATCH v7 15/21] timer: Add get next timer interrupt functionality for remote CPUs

Frederic Weisbecker
2023-06-07T14:55:39Z

On Wed, May 24, 2023 at 09:06:23AM +0200, Anna-Maria Behnsen wrote:
> +# ifdef CONFIG_SMP
> +/**
> + * fetch_next_timer_interrupt_remote
> + * @basej: base time jiffies
> + * @basem: base time clock monotonic
> + * @tevt: Pointer to the storage for the expiry values
> + * @cpu: Remote CPU
> + *
> + * Stores the next pending local and global timer expiry values in the
> + * struct pointed to by @tevt. If a queue is empty the corresponding
> + * field is set to KTIME_MAX. If local event expires before global
> + * event, global event is set to KTIME_MAX as well.
> + *
> + * Caller needs to make sure timer base locks are held (use
> + * timer_lock_remote_bases() for this purpose). Caller must make sure
> + * interrupts are reopened, if required.

That last sentence looks weird. All we want is the caller to call this
and the timer_[un]lock functions with interrupts disabled.

Now of course at some point the caller will need to unmask the IRQs
but heh, not our problem :)

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>