[PATCH v2 0/3] Use CNTVCTSS_EL0 in gettimeofday()

Joey Gouly joey.gouly at arm.com
Tue Aug 30 03:48:30 PDT 2022


Hi all,

This patchset adds support for using CNTVCTSS_EL0 in gettimeofday() in the vDSO.
This can improve the accuracy and efficiency of some applications that call
gettimeofday() a lot.

This has been tested on an internal platform and a publicly available platform
that has FEAT_ECV.

Changes since v1 [1]:
  - Tidy up asm() statement in gettimeofday.h
  - Move vdso patching before __apply_alternatives_multi_stop

Thanks,
Joey

[1]: https://lore.kernel.org/linux-arm-kernel/20220825102025.53916-1-joey.gouly@arm.com/

Joey Gouly (3):
  arm64: module: move find_section to header
  arm64: alternative: patch alternatives in the vDSO
  arm64: vdso: use SYS_CNTVCTSS_EL0 for gettimeofday

 arch/arm64/include/asm/module.h            | 15 ++++++++++++
 arch/arm64/include/asm/vdso.h              |  3 +++
 arch/arm64/include/asm/vdso/gettimeofday.h | 19 +++++++++++----
 arch/arm64/kernel/alternative.c            | 28 ++++++++++++++++++++++
 arch/arm64/kernel/module.c                 | 15 ------------
 arch/arm64/kernel/vdso.c                   |  3 ---
 arch/arm64/kernel/vdso/vdso.lds.S          |  7 ++++++
 7 files changed, 68 insertions(+), 22 deletions(-)

-- 
2.17.1




More information about the linux-arm-kernel mailing list