aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel/proc.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-04-24 13:54:41 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-04-24 13:54:41 +0300
commitbe3696bd5853819212b1240751efd8d85f282c68 (patch)
treefd58279b90ce82c073c6f8d9a929ceb00bec5703 /arch/riscv64/kernel/proc.c
parentd4c420689b1872f6fb22f421dfd27704ee94951a (diff)
downloadkmi-be3696bd5853819212b1240751efd8d85f282c68.tar.gz
kmi-be3696bd5853819212b1240751efd8d85f282c68.zip
start initial irq handling
+ Still lots todo, and I'm not entirely sure how I should handle program space switches (mainly since the kernel uses the process' stack, maybe it shouldn't?)
Diffstat (limited to 'arch/riscv64/kernel/proc.c')
-rw-r--r--arch/riscv64/kernel/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c
index ef8f24e..66325ec 100644
--- a/arch/riscv64/kernel/proc.c
+++ b/arch/riscv64/kernel/proc.c
@@ -5,7 +5,7 @@
stat_t jump_to_userspace(struct tcb *t, int argc, char **argv)
{
csr_write(CSR_SEPC, t->entry);
- __asm__ volatile("mv sp, %0\n" : "=r"(t->proc_stack)::"memory");
+ __asm__ volatile("mv sp, %0\n" ::"r"(t->proc_stack_top) : "memory");
__asm__ volatile("sret\n" ::: "memory");
/* we should never reach this */
return ERR_ADDR;