Replace rdcycle instruction with rdtime#1550
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
The `rdcycle` instruction causes SIGILL with RISCV_PMU_SBI=y in the kernel[1] According to a PR for the highway project[2] which fixed the same problem there `rdtime` is the proper equivalent for the x86 `rdtsc` instruction on RISC-V Using `rdtime` instead of `rdcycle` makes all tests pass on my VisionFive 2 board [1] https://lists.infradead.org/pipermail/linux-riscv/2022-September/018862.html [2] google/highway#961 Signed-off-by: Marvin Schmidt <marv@exherbo.org>
ab3acbf to
771d1f2
Compare
|
@bbarenblat had proposed a similar (identical?) change internally a few months ago. I pointed out that it is a little bit more complicated because |
|
Removing the |
Given I got no answer I gave it a tried, and I have found it is not necessary to provide |
|
This was addressed by #1644. |
The
rdcycleinstruction causes SIGILL with RISCV_PMU_SBI=y in the kernel[1]According to a PR for the highway project[2] which fixed the same problem there
rdtimeis the proper equivalent for the x86rdtscinstruction on RISC-VUsing
rdtimeinstead ofrdcyclemakes all tests pass on my VisionFive 2 board[1] https://lists.infradead.org/pipermail/linux-riscv/2022-September/018862.html
[2] google/highway#961