Run handlers with interrupts enabled.
authorkettenis <kettenis@openbsd.org>
Thu, 13 May 2021 09:32:00 +0000 (09:32 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 13 May 2021 09:32:00 +0000 (09:32 +0000)
ok jsg@

sys/arch/riscv64/dev/plic.c

index 2bfede5..29985fb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: plic.c,v 1.4 2021/05/12 01:20:52 jsg Exp $    */
+/*     $OpenBSD: plic.c,v 1.5 2021/05/13 09:32:00 kettenis Exp $       */
 
 /*
  * Copyright (c) 2020, Mars Li <mengshi.li.mars@gmail.com>
@@ -383,10 +383,9 @@ plic_irq_dispatch(uint32_t irq,    void *frame)
                else
                        arg = frame;
 
-// comment for now, ?!
-//             enable_interrupts();    //XXX allow preemption?
+               intr_enable();
                handled = ih->ih_func(arg);
-//             disable_interrupts();
+               intr_disable();
                if (handled)
                        ih->ih_count.ec_count++;