vppinfra: fix cpu time on riscv 77/43377/3
authorShubing Guo <[email protected]>
Tue, 1 Jul 2025 02:36:50 +0000 (10:36 +0800)
committerFlorin Coras <[email protected]>
Wed, 6 Aug 2025 23:17:09 +0000 (23:17 +0000)
commitacdc1d64c9a8eb97974905d49cde25d183f7c52f
treeda28aa0991bd5d68ae095fc8de8b0df7a399eac3
parent8941f9ade958d10cdfe0d94de84fd215ebc3968d
vppinfra: fix cpu time on riscv

Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on
RISC-V and can't be used directly from userland.Use RDTIME instead,
which while less accurate has the advantage of being synchronized
between CPU (and thus monotonic) and of constant frequency.

Type: fix
Change-Id: I53ab9cd1d0fcdd8f0e88d189840ba1d3b5ddd67a
Signed-off-by: Shubing Guo <[email protected]>
src/vppinfra/time.h