On 21.10.2025 16:21, Roger Pau Monné wrote:
> On Mon, Oct 20, 2025 at 01:21:18PM +0200, Jan Beulich wrote:
>> With 32-bit counters, writing 0 means on average half the wrapping period
>> until an interrupt would be raised. Yet of course in extreme cases an
>> interrupt would be raised almost right away. Write the present counter
>> value instead, to make the timeout predicatbly a full wrapping period.
>>
>> Fixes: e862b83e8433 ("CPUIDLE: Avoid remnant HPET intr while force hpetbroadcast")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Maybe I'm missing a path, but are there any callers that still pass
> STIME_MAX to reprogram_hpet_evt_channel()?
>
> hpet_broadcast_exit() no longer explicitly passes STIME_MAX like it
> did in e862b83e8433, and then the per-cpu timer_deadline variable is
> not set to STIME_MAX either in timer_softirq_action().
Good point. It was me missing the fact that "expire" is an unaltered function
argument; I (blindly) assumed it would be calculated there. So yes, that
check can simply go away.
Jan