Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Revert the in_interrupt() change to use again the x...



details:   https://anonhg.NetBSD.org/src/rev/ede0af24f1a7
branches:  trunk
changeset: 967400:ede0af24f1a7
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Dec 07 19:50:33 2019 +0000

description:
Revert the in_interrupt() change to use again the x86 specific code

This is prerequisite for kMSan and upcoming kernel changes.

Discussed with <maxv>

diffstat:

 sys/kern/subr_kcov.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 66b9f91b85f1 -r ede0af24f1a7 sys/kern/subr_kcov.c
--- a/sys/kern/subr_kcov.c      Sat Dec 07 19:38:29 2019 +0000
+++ b/sys/kern/subr_kcov.c      Sat Dec 07 19:50:33 2019 +0000
@@ -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 @@
 static inline bool __nomsan
 in_interrupt(void)
 {
-       return cpu_intr_p();
+       return curcpu()->ci_idepth >= 0;
 }
 
 void __sanitizer_cov_trace_pc(void);



Home | Main Index | Thread Index | Old Index