Module Name: src
Committed By: kamil
Date: Sat Dec 7 19:50:34 UTC 2019
Modified Files:
src/sys/kern: subr_kcov.c
Log Message:
Revert the in_interrupt() change to use again the x86 specific code
This is prerequisite for kMSan and upcoming kernel changes.
Discussed with <maxv>
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_kcov.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/kern/subr_kcov.c
diff -u src/sys/kern/subr_kcov.c:1.10 src/sys/kern/subr_kcov.c:1.11
--- src/sys/kern/subr_kcov.c:1.10 Sun Dec 1 17:41:11 2019
+++ src/sys/kern/subr_kcov.c Sat Dec 7 19:50:33 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_kcov.c,v 1.10 2019/12/01 17:41:11 kamil Exp $ */
+/* $NetBSD: subr_kcov.c,v 1.11 2019/12/07 19:50:33 kamil Exp $ */
/*
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -38,7 +38,6 @@
#include <sys/conf.h>
#include <sys/condvar.h>
-#include <sys/cpu.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/kmem.h>
@@ -343,7 +342,7 @@ out:
static inline bool __nomsan
in_interrupt(void)
{
- return cpu_intr_p();
+ return curcpu()->ci_idepth >= 0;
}
void __sanitizer_cov_trace_pc(void);