public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: WFxT fixes, take #2
@ 2026-02-26  8:22 Marc Zyngier
  2026-02-26  8:22 ` [PATCH 1/3] arm64: Fix sampling the "stable" virtual counter in preemptible section Marc Zyngier
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Marc Zyngier @ 2026-02-26  8:22 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Will Deacon, Catalin Marinas, Mark Rutland, Ben Horgan,
	Daniel Lezcano

After my previous WFxT fix went in 7.0-rc1 as 29cc0f3aa7c64 ("arm64:
Force the use of CNTVCT_EL0 in __delay()"), Ben reported that it isn't
playing nice with preemption, due to the use of the timer workaround
percpu variable. This series tries to address this, and propose a
hopefully better alternative.

That alternative is in the form of a new "virtual counter" accessor,
available in the same way arch_timer_read_counter() is, except that it
is guaranteed to be the virtual counter. This helper (a function
pointer, really) is updated on each CPU boot in the same manner the
counter accessor is.

This is then plugged into the __delay() helper, providing the expected
guarantees (and resulting in a much nicer code gen).

Patches on top of -rc1.

Marc Zyngier (3):
  arm64: Fix sampling the "stable" virtual counter in preemptible
    section
  clocksource/drivers/arm_arch_timer: Expose a direct accessor for the
    virtual counter
  arm64: Convert __delay_cycles() to arch_timer_read_vcounter()

 arch/arm64/lib/delay.c               | 5 ++++-
 drivers/clocksource/arm_arch_timer.c | 5 +++++
 include/clocksource/arm_arch_timer.h | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-02-27  3:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26  8:22 [PATCH 0/3] arm64: WFxT fixes, take #2 Marc Zyngier
2026-02-26  8:22 ` [PATCH 1/3] arm64: Fix sampling the "stable" virtual counter in preemptible section Marc Zyngier
2026-02-26  8:22 ` [PATCH 2/3] clocksource/drivers/arm_arch_timer: Expose a direct accessor for the virtual counter Marc Zyngier
2026-02-26 13:48   ` Ben Horgan
2026-02-26 14:03     ` Ben Horgan
2026-02-26 16:48       ` Marc Zyngier
2026-02-26 18:09         ` Will Deacon
2026-02-26  8:22 ` [PATCH 3/3] arm64: Convert __delay_cycles() to arch_timer_read_vcounter() Marc Zyngier
2026-02-26 12:53 ` [PATCH 0/3] arm64: WFxT fixes, take #2 André Draszik
2026-02-26 13:36 ` Ben Horgan
2026-02-27  3:16 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox