Skip to content
Commit 3f8e326d authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Anas Nashif
Browse files

riscv: stop preserving the tp register needlessly



The tp (x4) register is neither caller nor callee saved according to
the RISC-V standard calling convention. It only has to be set on thread
context switching and is otherwise read-only.

To protect the kernel against a possible rogue user thread, the tp is
also re-set on exception entry from u-mode.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 95b18c7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment