Skip to content

arm64: WFxT fixes, take #2

Marc Zyngier linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: Fix sampling the "stable" virtual counter in preemptible sectionarch/arm64/lib/delay.c+5 -10 replies
2/3clocksource/drivers/arm_arch_timer: Expose a direct accessor for the virtual counterdrivers/clocksource/arm_arch_timer.c include/clocksource/arm_arch_timer.h+6 -04 replies
3/3arm64: Convert __delay_cycles() to arch_timer_read_vcounter()arch/arm64/lib/delay.c+2 -30 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchAndré DraszikBen Horgan
SeriesT-b T-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] arm64: WFxT fixes, take #2

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(-)
Signature · 1 line
2.47.3