From 0bb52ad97135b75a6a1890d0564731353cf32a12 Mon Sep 17 00:00:00 2001 From: rin Date: Thu, 15 Apr 2021 08:23:24 +0000 Subject: [PATCH] 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! --- sys/arch/alpha/include/cpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 5722e2e8fffe..30eb07c38d88 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -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