aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/kernel/cpu.c')
-rw-r--r--arch/riscv64/kernel/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv64/kernel/cpu.c b/arch/riscv64/kernel/cpu.c
index 60140e6..e8c8f34 100644
--- a/arch/riscv64/kernel/cpu.c
+++ b/arch/riscv64/kernel/cpu.c
@@ -39,7 +39,8 @@ id_t cpu_id()
/* @todo should this be the default for all arches? */
struct tcb *cur_tcb()
{
- register struct tcb *t __asm__ ("tp");
+ struct tcb *t;
+ __asm__ volatile ("mv %0, tp" : "=r" (t) ::);
return t;
}