Module Name:    src
Committed By:   rin
Date:           Thu Apr 15 08:23:24 UTC 2021

Modified Files:
        src/sys/arch/alpha/include: cpu.h

Log Message:
Fix fallout from alpha/interrupt.c rev 1.93:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/alpha/alpha/interrupt.c#rev1.93

by which interrupts *seem* to occupy 100% CPU time.

Now, we bump ci_intrdepth for clock interrupt. Therefore, if ci_intrdepth > 1
is observed in statclock(), CPU is actually occupied by interrupts.

Thanks jklos and thorpej for notice!


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/alpha/include/cpu.h

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/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.99 src/sys/arch/alpha/include/cpu.h:1.100
--- src/sys/arch/alpha/include/cpu.h:1.99	Thu Oct 15 01:00:01 2020
+++ src/sys/arch/alpha/include/cpu.h	Thu Apr 15 08:23:24 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.99 2020/10/15 01:00:01 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.100 2021/04/15 08:23:24 rin Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -205,7 +205,8 @@ struct clockframe {
  * r/m/w cycle is complete, we won't be counted... but it's not
  * like this stastic has to be extremely accurate.
  */
-#define	CLKF_INTR(framep)	(curcpu()->ci_intrdepth)
+#define	CLKF_INTR(framep)						\
+	(curcpu()->ci_intrdepth > 1)	/* one for clock interrupt itself */
 
 /*
  * This is used during profiling to integrate system time.  It can safely

Reply via email to