Module Name:    src
Committed By:   kamil
Date:           Sun Dec  1 17:41:11 UTC 2019

Modified Files:
        src/sys/kern: subr_kcov.c

Log Message:
Switch in_interrupt() in KCOV to cpu_intr_p()

This makes KCOV more MI friendly and removes x86-specific in_interrupt()
implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 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.9 src/sys/kern/subr_kcov.c:1.10
--- src/sys/kern/subr_kcov.c:1.9	Fri Nov 15 09:44:44 2019
+++ src/sys/kern/subr_kcov.c	Sun Dec  1 17:41:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kcov.c,v 1.9 2019/11/15 09:44:44 maxv Exp $	*/
+/*	$NetBSD: subr_kcov.c,v 1.10 2019/12/01 17:41:11 kamil Exp $	*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 
 #include <sys/conf.h>
 #include <sys/condvar.h>
+#include <sys/cpu.h>
 #include <sys/file.h>
 #include <sys/filedesc.h>
 #include <sys/kmem.h>
@@ -342,7 +343,7 @@ out:
 static inline bool __nomsan
 in_interrupt(void)
 {
-	return curcpu()->ci_idepth >= 0;
+	return cpu_intr_p();
 }
 
 void __sanitizer_cov_trace_pc(void);

Reply via email to