Catalin Marinas [off-list ref] writes:
On Sun, Feb 08, 2026 at 06:31:45PM -0800, Ankur Arora wrote:
quoted
diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h
index d7a540736741..dfb7d10a18be 100644
--- a/arch/arm64/include/asm/cmpxchg.h
+++ b/arch/arm64/include/asm/cmpxchg.h
@@ -12,6 +12,7 @@
#include <asm/barrier.h>
#include <asm/lse.h>
+#include <asm/delay-const.h>
/*
* We need separate acquire parameters for ll/sc and lse, since the full
@@ -208,9 +209,13 @@ __CMPXCHG_GEN(_mb)
__cmpxchg128((ptr), (o), (n)); \
})
+/* Re-declared here to avoid include dependency. */
+extern u64 (*arch_timer_read_counter)(void);
We have a bug in udelay() because the above might read the physical
counter while WFET uses the virtual one. See this thread:
https://lore.kernel.org/all/ktosachvft2cgqd5qkukn275ugmhy6xrhxur4zqpdxlfr3qh5h@o3zrfnsq63od/ (local)
Oh that looks painful. Thanks for linking it.
We could use __arch_counter_get_cntvct_stable() as in Marc's suggestion
for the udelay() fix (or just wait to see the outcome of the above
thread).
Yeah will follow where that goes.
The rest looks fine.
Great. Thanks!
--
ankur