Re: [GIT pull] timers/cleanups for v7.3-rc1
From: Thomas Gleixner
Date: Wed Aug 19 2026 - 17:01:25 EST
On Wed, Aug 19 2026 at 11:48, Nathan Chancellor wrote:
>> -int read_current_timer(unsigned long *timer_val)
>> +bool delay_read_timer(unsigned long *timer_val)
>> {
>> if (!delay_timer)
>> - return -ENXIO;
>> -
>> + return false;
>> *timer_val = delay_timer->read_current_timer();
>> - return 0;
>> + return true;
>> }
>> -EXPORT_SYMBOL_GPL(read_current_timer);
>> +EXPORT_SYMBOL_GPL(delay_read_timer);
>>
>> static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift)
>> {
>
> I bisected a hang that I see after getting to userspace when virtually
> testing some ARM configurations to commit dfc256dac54c ("calibrate:
> Rework delay timer calibration"). It looks like the branches in
> get_cycles() were not updated for the changed meaning of the return of
> delay_read_timer()? This appears to resolve it for me but I am not sure
> if I am missing something.
>
> diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
> index 94e40c19cfc5..4d31eab9dba2 100644
> --- a/arch/arm/include/asm/timex.h
> +++ b/arch/arm/include/asm/timex.h
> @@ -13,7 +13,7 @@ typedef unsigned long cycles_t;
> // Temporary workaround until timex.h is cleaned up
> bool delay_read_timer(unsigned long *t);
>
> -#define get_cycles() ({ cycles_t c; delay_read_timer(&c) ? 0 : c; })
> +#define get_cycles() ({ cycles_t c; delay_read_timer(&c) ? c : 0; })
Duh, yes. Stupid me.
Can you please send a patch wuth a proper change log and a Fixes tag?
Thanks,
tglx