Skip to content

Use architected timers for delay loop

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM: arch timer: implement read_current_timer and get_cyclesarch/arm/include/asm/arch_timer.h arch/arm/include/asm/timex.h arch/arm/kernel/arch_timer.c+15 -41 reply
1/2ARM: arch timer: implement read_current_timer and get_cycles+0 -01 reply
2/2ARM: delay: allow timer-based delay implementation to be selectedarch/arm/include/asm/delay.h arch/arm/kernel/arch_timer.c arch/arm/kernel/armksyms.c +4 more+97 -201 reply
2/2ARM: delay: allow timer-based delay implementation to be selected+0 -01 reply
2/2ARM: delay: allow timer-based delay implementation to be selectedarch/arm/include/asm/delay.h arch/arm/lib/delay-loop.S arch/arm/lib/delay.c+16 -71 reply
2/2ARM: delay: allow timer-based delay implementation to be selected+0 -00 replies
2/2ARM: delay: allow timer-based delay implementation to be selected+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Use architected timers for delay loop

Hello,

This patch series reworks our delay loop implementation to allow the busy-loop to be replaced with the physical counter included as part of the architected timer on recent CPUs. The polling implementation is still maintained to support cores without the timers and we use the same maths and upper delay bound of 2ms.

Russell - I think my maths is correct, but why can't we increase the
precision by using a magic constant of 4398046U and a right shift of 31?

As usual, all feedback is welcome,

Will

Will Deacon (2):
ARM: arch timer: implement read_current_timer and get_cycles
ARM: delay: allow timer-based delay implementation to be selected

 arch/arm/include/asm/arch_timer.h      |    1 +
 arch/arm/include/asm/delay.h           |   19 +++++++--
 arch/arm/include/asm/timex.h           |   10 +++--
 arch/arm/kernel/arch_timer.c           |   11 +++++
 arch/arm/kernel/armksyms.c             |    3 +-
 arch/arm/lib/Makefile                  |    2 +-
 arch/arm/lib/{delay.S => delay-loop.S} |   16 +++----
 arch/arm/lib/delay.c                   |   66 ++++++++++++++++++++++++++++++++
 arch/arm/mach-sa1100/sleep.S           |    8 ++--
 9 files changed, 112 insertions(+), 24 deletions(-)
 rename arch/arm/lib/{delay.S => delay-loop.S} (85%)
 create mode 100644 arch/arm/lib/delay.c
Signature · 1 line
1.7.4.1