Module Name: src Committed By: jmcneill Date: Mon Feb 15 17:46:36 UTC 2021
Modified Files: src/sys/arch/aarch64/aarch64: trap.c Log Message: interrupt: enable interrupts before running soft intr handlers. To avoid stack usage going out of control, only do this at ci_intr_depth==0. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/aarch64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/trap.c diff -u src/sys/arch/aarch64/aarch64/trap.c:1.41 src/sys/arch/aarch64/aarch64/trap.c:1.42 --- src/sys/arch/aarch64/aarch64/trap.c:1.41 Fri Dec 11 18:03:33 2020 +++ src/sys/arch/aarch64/aarch64/trap.c Mon Feb 15 17:46:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.41 2020/12/11 18:03:33 skrll Exp $ */ +/* $NetBSD: trap.c,v 1.42 2021/02/15 17:46:36 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.41 2020/12/11 18:03:33 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.42 2021/02/15 17:46:36 jmcneill Exp $"); #include "opt_arm_intr_impl.h" #include "opt_compat_netbsd32.h" @@ -521,7 +521,10 @@ interrupt(struct trapframe *tf) ARM_IRQ_HANDLER(tf); ci->ci_intr_depth--; - cpu_dosoftints(); + if (ci->ci_intr_depth == 0 && (ci->ci_softints >> ci->ci_cpl) > 0) { + ENABLE_INTERRUPT(); + cpu_dosoftints(); + } } #ifdef COMPAT_NETBSD32