From: kettenis Date: Thu, 13 May 2021 06:45:23 +0000 (+0000) Subject: No need to disable interrupts before returning to userland. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ac7c817f2e4547de17a7d9340eb46c5fddfaeee7;p=openbsd No need to disable interrupts before returning to userland. The AST processing code will take care of doing that for us. ok jsg@ --- diff --git a/sys/arch/riscv64/riscv64/trap.c b/sys/arch/riscv64/riscv64/trap.c index a83ec45b20e..968d2626387 100644 --- a/sys/arch/riscv64/riscv64/trap.c +++ b/sys/arch/riscv64/riscv64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.7 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: trap.c,v 1.8 2021/05/13 06:45:23 kettenis Exp $ */ /* * Copyright (c) 2020 Shivam Waghela @@ -142,7 +142,7 @@ do_trap_user(struct trapframe *frame) return; } - enable_interrupts(); //XXX allow preemption? + intr_enable(); #if 0 // XXX Debug logging printf( "do_trap_user: curproc: %p, sepc: %lx, ra: %lx frame: %p\n", @@ -185,7 +185,7 @@ do_trap_user(struct trapframe *frame) panic("Unknown userland exception %llx, trap value %lx\n", exception, frame->tf_stval); } - disable_interrupts(); /* XXX - ??? */ + /* now that we will not context switch again, * see if we should enable FPU */