summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/cpu.h
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>1999-11-19 13:38:22 +0000
committergallatin <gallatin@FreeBSD.org>1999-11-19 13:38:22 +0000
commit3544d646b5ba034af1430a8d204a232f969894de (patch)
tree0c261b0e8a872e3b7474ca3309c4b7ae1ba490c6 /sys/alpha/include/cpu.h
parent7ce247ec07aa4a318c2186aca94d3d2995cce951 (diff)
downloadFreeBSD-src-3544d646b5ba034af1430a8d204a232f969894de.zip
FreeBSD-src-3544d646b5ba034af1430a8d204a232f969894de.tar.gz
Properly attribute interrupt time on alpha. Previously, interrupt time
was likely to be counted as idle time. Note that we are counting time spent in software interrupt handlers as interrupt time, so this invalidates the i386 meaning of intr_nesting_level. Reviewed by: dfr, bde Tested by: anderson@cs.duke.edu
Diffstat (limited to 'sys/alpha/include/cpu.h')
-rw-r--r--sys/alpha/include/cpu.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index b9ff12d..12436a1 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -65,11 +65,7 @@ struct clockframe {
#define CLKF_BASEPRI(framep) \
(((framep)->cf_tf.tf_regs[FRAME_PS] & ALPHA_PSL_IPL_MASK) == 0)
#define CLKF_PC(framep) ((framep)->cf_tf.tf_regs[FRAME_PC])
-/*
- * XXX No way to accurately tell if we were in interrupt mode before taking
- * clock interrupt.
- */
-#define CLKF_INTR(framep) (0)
+#define CLKF_INTR(framep) (intr_nesting_level >= 2)
/*
* Preempt the current process if in interrupt from user mode,
@@ -96,6 +92,7 @@ struct clockframe {
#ifdef KERNEL
u_int32_t astpending; /* need to trap before returning to user mode */
+u_int32_t intr_nesting_level; /* bookeeping only; counts software intr */
u_int32_t want_resched; /* resched() was called */
#endif
OpenPOWER on IntegriCloud