svn commit: r366515 - head/sys/riscv/riscv
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Oct 7 12:11:11 UTC 2020
Author: trasz
Date: Wed Oct 7 12:11:11 2020
New Revision: 366515
URL: https://svnweb.freebsd.org/changeset/base/366515
Log:
Don't use critical section when calling intr_irq_handler() - that function
enters critical section by itself anyway.
Reviewed by: kp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26694
Modified:
head/sys/riscv/riscv/intr_machdep.c
Modified: head/sys/riscv/riscv/intr_machdep.c
==============================================================================
--- head/sys/riscv/riscv/intr_machdep.c Wed Oct 7 10:58:56 2020 (r366514)
+++ head/sys/riscv/riscv/intr_machdep.c Wed Oct 7 12:11:11 2020 (r366515)
@@ -158,8 +158,6 @@ riscv_cpu_intr(struct trapframe *frame)
struct intr_irqsrc *isrc;
int active_irq;
- critical_enter();
-
KASSERT(frame->tf_scause & EXCP_INTR,
("riscv_cpu_intr: wrong frame passed"));
@@ -169,18 +167,16 @@ riscv_cpu_intr(struct trapframe *frame)
case IRQ_SOFTWARE_USER:
case IRQ_SOFTWARE_SUPERVISOR:
case IRQ_TIMER_SUPERVISOR:
+ critical_enter();
isrc = &isrcs[active_irq].isrc;
if (intr_isrc_dispatch(isrc, frame) != 0)
printf("stray interrupt %d\n", active_irq);
+ critical_exit();
break;
case IRQ_EXTERNAL_SUPERVISOR:
intr_irq_handler(frame);
break;
- default:
- break;
}
-
- critical_exit();
}
#ifdef SMP
More information about the svn-src-all
mailing list