[riot-notifications] [RIOT-OS/RIOT] fe310: Use ecall instruction for thread yield (#15736)
notifications at github.com
Mon Jan 11 11:07:40 CET 2021
### Contribution description
This switches the thread yield on the ~~fe310~~ RISC-V CPU to use the ECALL instruction to trap the core. Currently the software interrupt is used for this, but this is supposed to be used for inter-core interrupts according to the manual.
I've kept the option open on the interface to add a number and some context to the ecall and have this passed to the trap handler. This still has to be hooked up to the trap handler itself in the future.
### Testing procedure
This is only tested on Qemu as I currently don't have hardware to test this.
Thread switching on an fe310-based board, e.g. `tests/bench_mutex_pingpong`
I'm also curious about actual numbers, this improves performance for me on Qemu, but no clue if that's also the case on real hardware.
### Issues/PRs references
Alternative to #15277
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* fe310: Use ecall instruction for thread yield
-- File Changes --
M cpu/fe310/irq_arch.c (26)
M cpu/fe310/thread_arch.c (20)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications