Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/include Make CLKF_INTR() more intelligent.



details:   https://anonhg.NetBSD.org/src/rev/3d006cce32d9
branches:  trunk
changeset: 480028:3d006cce32d9
user:      eeh <eeh%NetBSD.org@localhost>
date:      Thu Dec 30 16:26:18 1999 +0000

description:
Make CLKF_INTR() more intelligent.

diffstat:

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

diffs (28 lines):

diff -r 13ea388b7ee3 -r 3d006cce32d9 sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h    Thu Dec 30 16:25:17 1999 +0000
+++ b/sys/arch/sparc64/include/cpu.h    Thu Dec 30 16:26:18 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.14 1999/11/06 20:13:49 eeh Exp $ */
+/*     $NetBSD: cpu.h,v 1.15 1999/12/30 16:26:18 eeh Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -83,6 +83,7 @@
  * as well for strayintr (see locore.s:interrupt and intr.c:strayintr).
  * Note that CLKF_INTR is valid only if CLKF_USERMODE is false.
  */
+extern int intstack[];
 extern int eintstack[];
 struct clockframe {
        struct trapframe64 t;
@@ -91,7 +92,9 @@
 #define        CLKF_USERMODE(framep)   (((framep)->t.tf_tstate & TSTATE_PRIV) == 0)
 #define        CLKF_BASEPRI(framep)    (((framep)->t.tf_oldpil) == 0)
 #define        CLKF_PC(framep)         ((framep)->t.tf_pc)
-#define        CLKF_INTR(framep)       (((framep)->t.tf_kstack < (u_int)eintstack)&&((framep)->t.tf_kstack > (u_int)KERNBASE))
+#define        CLKF_INTR(framep)       ((!CLKF_USERMODE(framep))&&\
+                               (((framep)->t.tf_kstack < (u_int)eintstack)&&\
+                               ((framep)->t.tf_kstack > (u_int)intstack)))
 
 /*
  * Software interrupt request `register'.



Home | Main Index | Thread Index | Old Index