Files
linux/arch/arm64/lib
Marc Zyngier e5cb94ba5f arm64: Fix sampling the "stable" virtual counter in preemptible section
Ben reports that when running with CONFIG_DEBUG_PREEMPT, using
__arch_counter_get_cntvct_stable() results in well deserves warnings,
as we access a per-CPU variable without preemption disabled.

Fix the issue by disabling preemption on reading the counter. We can
probably do a lot better by not disabling preemption on systems that
do not require horrible workarounds to return a valid counter value,
but this plugs the issue for the time being.

Fixes: 29cc0f3aa7 ("arm64: Force the use of CNTVCT_EL0 in __delay()")
Reported-by: Ben Horgan <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Ben Horgan <[email protected]>
Tested-by: André Draszik <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
2026-02-26 18:12:48 +00:00
..
2022-02-22 16:21:34 +00:00
2022-02-22 16:21:34 +00:00
2022-02-22 16:21:34 +00:00
2022-02-22 16:21:34 +00:00
2022-02-22 16:21:34 +00:00
2022-02-22 16:21:34 +00:00
2025-04-30 21:55:06 +02:00