diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-29 21:17:31 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-29 21:17:31 +0200 |
| commit | 5976ad390a15726c3ddfacf8c8b282c8350f9554 (patch) | |
| tree | 24a55fcd7e6f28d048ac074da59f428b54a81cb0 /arch/riscv64/kernel/vmem.c | |
| parent | 314bca3dc19a864c76153bfcd5a58be8c40000f9 (diff) | |
| download | kmi-5976ad390a15726c3ddfacf8c8b282c8350f9554.tar.gz kmi-5976ad390a15726c3ddfacf8c8b282c8350f9554.zip | |
start moving towards threads always being in rpc
Diffstat (limited to 'arch/riscv64/kernel/vmem.c')
| -rw-r--r-- | arch/riscv64/kernel/vmem.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/riscv64/kernel/vmem.c b/arch/riscv64/kernel/vmem.c index 29ec3d5..cf1391e 100644 --- a/arch/riscv64/kernel/vmem.c +++ b/arch/riscv64/kernel/vmem.c @@ -538,7 +538,7 @@ vm_t setup_kernel_io(struct vmem *b, vm_t paddr) } #endif -void clone_uvmem(struct vmem * restrict r, struct vmem * restrict b) +void clone_uvmem(struct vmem *r, struct vmem *b) { size_t i = 0; for (; i < CSTACK_PAGE; ++i) { @@ -574,20 +574,11 @@ stat_t setup_rpc_stack(struct tcb *t) if (!page) return ERR_OOMEM; - /* map both into rpc and proc spaces so we can write to the - * current stack frame directly. Especially important when - * returning from an rpc. Technically means that we could leak - * memory if map_vpage() for proc.vmem allocates more and more - * pages, but good enough for now. */ if (map_vpage(t->rpc.vmem, page, RPC_STACK_BASE + BASE_PAGE_SIZE * i, flags, BASE_PAGE)) return ERR_OOMEM; - if (map_vpage(t->proc.vmem, page, - RPC_STACK_BASE + BASE_PAGE_SIZE * i, - flags, BASE_PAGE)) - return ERR_OOMEM; } /* we allocated a second order page for rpc stack usage */ |
