Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/include Fix fallout from alpha/interrupt.c re...



details:   https://anonhg.NetBSD.org/src/rev/d049b3844d91
branches:  trunk
changeset: 982509:d049b3844d91
user:      rin <rin%NetBSD.org@localhost>
date:      Thu Apr 15 08:23:24 2021 +0000

description:
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!

diffstat:

 sys/arch/alpha/include/cpu.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 6385f5e25b46 -r d049b3844d91 sys/arch/alpha/include/cpu.h
--- a/sys/arch/alpha/include/cpu.h      Thu Apr 15 07:00:50 2021 +0000
+++ b/sys/arch/alpha/include/cpu.h      Thu Apr 15 08:23:24 2021 +0000
@@ -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 @@
  * 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



Home | Main Index | Thread Index | Old Index