From 4d47f7dde4343a1b90cd53d39aa77b3e7b09313c Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Tue, 30 Dec 2003 21:21:41 +0000 Subject: provide accounting for the intr time properly from fredette@ --- sys/arch/hppa/hppa/intr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c index ea532680ffe..48781e58fa3 100644 --- a/sys/arch/hppa/hppa/intr.c +++ b/sys/arch/hppa/hppa/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.14 2003/12/20 21:49:06 miod Exp $ */ +/* $OpenBSD: intr.c,v 1.15 2003/12/30 21:21:40 mickey Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -60,7 +60,7 @@ struct hppa_iv { } __packed; register_t kpsw = PSL_Q | PSL_P | PSL_C | PSL_D; -volatile int cpl = IPL_NESTED; +volatile int cpu_inintr, cpl = IPL_NESTED; u_long cpu_mask; struct hppa_iv *intr_list, intr_store[8*2*CPU_NINTS], *intr_more = intr_store; struct hppa_iv intr_table[CPU_NINTS] = { @@ -223,7 +223,10 @@ cpu_intr(void *v) { struct trapframe *frame = v; u_long mask; - int s = cpl; + int oldintr, s = cpl; + + if ((oldintr = cpu_inintr++)) + frame->tf_flags |= TFF_INTR; while ((mask = ipending & ~imask[s])) { int r, bit = ffs(mask) - 1; @@ -247,5 +250,6 @@ cpu_intr(void *v) #endif mtctl(0, CR_EIEM); } + cpu_inintr--; cpl = s; } -- cgit v1.2.3