No need to disable interrupts before returning to userland.
authorkettenis <kettenis@openbsd.org>
Thu, 13 May 2021 06:45:23 +0000 (06:45 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 13 May 2021 06:45:23 +0000 (06:45 +0000)
The AST processing code will take care of doing that for us.

ok jsg@

sys/arch/riscv64/riscv64/trap.c

index a83ec45..968d262 100644 (file)
@@ -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 <shivamwaghela@gmail.com>
@@ -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
         */