Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Contrary to comment here, nowadays hard...
details: https://anonhg.NetBSD.org/src/rev/5bef42c98011
branches: trunk
changeset: 961298:5bef42c98011
user: rin <rin%NetBSD.org@localhost>
date: Thu Apr 15 00:19:52 2021 +0000
description:
Contrary to comment here, nowadays hardclock() and statclock() should be
called with cpu_intr_p() is turning on, if used from the interrupt context.
Otherwise, entropy_enter() is used instead of entropy_enter_intr(), which
results in KASSERT() failure.
Therefore, bump ci_intrdepth for clock interrupt. Remove stale comment also.
diffstat:
sys/arch/alpha/alpha/interrupt.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r a42826718fe2 -r 5bef42c98011 sys/arch/alpha/alpha/interrupt.c
--- a/sys/arch/alpha/alpha/interrupt.c Thu Apr 15 00:11:09 2021 +0000
+++ b/sys/arch/alpha/alpha/interrupt.c Thu Apr 15 00:19:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.92 2020/10/10 03:05:04 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.93 2021/04/15 00:19:52 rin Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.92 2020/10/10 03:05:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.93 2021/04/15 00:19:52 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -212,12 +212,7 @@
break;
case ALPHA_INTR_CLOCK: /* clock interrupt */
- /*
- * We don't increment the interrupt depth for the
- * clock interrupt, since it is *sampled* from
- * the clock interrupt, so if we did, all system
- * time would be counted as interrupt time.
- */
+ atomic_inc_ulong(&ci->ci_intrdepth);
sc->sc_evcnt_clock.ev_count++;
ci->ci_data.cpu_nintr++;
if (platform.clockintr) {
@@ -242,6 +237,7 @@
schedhz != 0)
schedclock(ci->ci_curlwp);
}
+ atomic_dec_ulong(&ci->ci_intrdepth);
break;
case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */
Home |
Main Index |
Thread Index |
Old Index