All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [GIT pull] timers/cleanups for v7.3-rc1
Date: Wed, 19 Aug 2026 11:48:03 -0700	[thread overview]
Message-ID: <20260819184803.GA3333711@ax162> (raw)
In-Reply-To: <178696575847.1270771.17330908414715876847.tglx@fw13>

Hi Thomas,

On Mon, Aug 17, 2026 at 01:23:52PM +0200, Thomas Gleixner wrote:
>       calibrate: Rework delay timer calibration
...
> diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
> index 6d1337c169cd..94e40c19cfc5 100644
> --- a/arch/arm/include/asm/timex.h
> +++ b/arch/arm/include/asm/timex.h
> @@ -10,7 +10,10 @@
>  #define _ASMARM_TIMEX_H
>  
>  typedef unsigned long cycles_t;
> -#define get_cycles()	({ cycles_t c; read_current_timer(&c) ? 0 : c; })
> +// 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 random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
>  
>  #endif
> diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
> index b7fe84f68bf1..7e9304012a68 100644
> --- a/arch/arm/lib/delay.c
> +++ b/arch/arm/lib/delay.c
> @@ -12,7 +12,6 @@
>  #include <linux/init.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/timex.h>
>  
>  /*
>   * Default to the loop-based delay implementation.
> @@ -27,15 +26,14 @@ static const struct delay_timer *delay_timer;
>  static bool delay_calibrated;
>  static u64 delay_res;
>  
> -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; })
 #define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
 
 #endif
--

# bad: [f4cdf7ca9a1fdcca413157df19753f388a5a224e] Merge tag 'media/v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
# good: [8d3ae59288f1e7d58d76558a6ee96d533bc5019f] Linux 7.2
git bisect start 'f4cdf7ca9a1fdcca413157df19753f388a5a224e' 'v7.2'
# bad: [cbe8aadf1551f3f4a853f24b3b96d9f0eea49c53] Merge tag 'soc-dt-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
git bisect bad cbe8aadf1551f3f4a853f24b3b96d9f0eea49c53
# good: [762fffa407d8d24288513538cf5d17c2c5425258] Merge tag 'irq-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 762fffa407d8d24288513538cf5d17c2c5425258
# good: [0b02b8f941911895775b56c428e01b117ce9d2f3] Merge tag 'spacemit-dt-for-7.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux into soc/dt
git bisect good 0b02b8f941911895775b56c428e01b117ce9d2f3
# good: [f809cedd3f614e4596aae23756ed44085fee1691] Merge tag 'qcom-arm32-for-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt
git bisect good f809cedd3f614e4596aae23756ed44085fee1691
# bad: [3b4128b9f374b4219eb716f4ad8a307bc7eb3d84] Merge tag 'timers-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 3b4128b9f374b4219eb716f4ad8a307bc7eb3d84
# bad: [030c9f813b8e48d2b066983c94cf6294968f9496] Merge tag 'timers-cleanups-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 030c9f813b8e48d2b066983c94cf6294968f9496
# good: [8b5d31123f41957fe265deeb03ee87fe62f155a8] Merge tag 'irq-drivers-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 8b5d31123f41957fe265deeb03ee87fe62f155a8
# good: [6c4a1b972643d72bd26f674677df8b5a6a3fe94f] selftests/futex: Provide thread creation and synchronization helpers
git bisect good 6c4a1b972643d72bd26f674677df8b5a6a3fe94f
# good: [66344732b058e75f7ef25dcd0fbb483f9c000633] smp: Remove preempt_disable() from smp_call_function()
git bisect good 66344732b058e75f7ef25dcd0fbb483f9c000633
# good: [0dd1a54f44348d9cf6bae57a2b5cb0b53826a2c7] Merge tag 'smp-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 0dd1a54f44348d9cf6bae57a2b5cb0b53826a2c7
# good: [3ed403bbc967a3138b8e37566510e9b062751372] treewide: Remove CLOCK_TICK_RATE
git bisect good 3ed403bbc967a3138b8e37566510e9b062751372
# bad: [dfc256dac54c8b692110bf905c64cb130e15963d] calibrate: Rework delay timer calibration
git bisect bad dfc256dac54c8b692110bf905c64cb130e15963d
# first 'bad' commit: [dfc256dac54c8b692110bf905c64cb130e15963d] calibrate: Rework delay timer calibration

-- 
Cheers,
Nathan

  parent reply	other threads:[~2026-08-19 18:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 11:23 [GIT pull] core/entry for v7.3-rc1 Thomas Gleixner
2026-08-17 11:23 ` [GIT pull] core/rseq " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:23 ` [GIT pull] irq/core " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:23 ` [GIT pull] irq/drivers " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:23 ` [GIT pull] locking/futex " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:23 ` [GIT pull] smp/core " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:23 ` [GIT pull] timers/cleanups " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-19 18:48   ` Nathan Chancellor [this message]
2026-08-19 20:59     ` Thomas Gleixner
2026-08-19 21:44       ` Nathan Chancellor
2026-08-23  7:59         ` Ingo Molnar
2026-08-17 11:23 ` [GIT pull] timers/clocksource " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:24 ` [GIT pull] timers/core " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-19  1:10   ` pr-tracker-bot
2026-08-17 11:24 ` [GIT pull] timers/vdso " Thomas Gleixner
2026-08-19  1:10   ` pr-tracker-bot
2026-08-19  1:10   ` pr-tracker-bot
2026-08-19  1:10 ` [GIT pull] core/entry " pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819184803.GA3333711@ax162 \
    --to=nathan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.