Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CycleClock: use RDTIME instead of RDCYCLE on RISC-V (#1727)
Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear. Use RDTIME instead, which while less accurate has the advantage of being synchronized between CPU (and thus monotonic) and of constant frequency. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 Co-authored-by: dominic <[email protected]>
- Loading branch information