Module Name: src
Committed By: ryo
Date: Thu Aug 6 06:50:39 UTC 2020
Modified Files:
src/sys/arch/aarch64/aarch64: fault.c
Log Message:
No need to recover from fault from within a hardware interrupt handler.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/fault.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/fault.c
diff -u src/sys/arch/aarch64/aarch64/fault.c:1.17 src/sys/arch/aarch64/aarch64/fault.c:1.18
--- src/sys/arch/aarch64/aarch64/fault.c:1.17 Thu Aug 6 06:49:55 2020
+++ src/sys/arch/aarch64/aarch64/fault.c Thu Aug 6 06:50:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.17 2020/08/06 06:49:55 ryo Exp $ */
+/* $NetBSD: fault.c,v 1.18 2020/08/06 06:50:39 ryo Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.17 2020/08/06 06:49:55 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.18 2020/08/06 06:50:39 ryo Exp $");
#include "opt_compat_netbsd32.h"
#include "opt_ddb.h"
@@ -223,10 +223,12 @@ data_abort_handler(struct trapframe *tf,
do_fault:
/* faultbail path? */
- fb = cpu_disable_onfault();
- if (fb != NULL) {
- cpu_jump_onfault(tf, fb, EFAULT);
- return;
+ if (curcpu()->ci_intr_depth == 0) {
+ fb = cpu_disable_onfault();
+ if (fb != NULL) {
+ cpu_jump_onfault(tf, fb, EFAULT);
+ return;
+ }
}
handle_fault: