summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-01-19 17:42:06 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-01-19 17:42:06 +0000
commit99952fdc78a07ec261884d2e753f1b4336dd7e81 (patch)
treea20cc7016e0119538b71962c379f5375c0646bf5 /sys/arch/sparc64/include
parent41693c7d5db15f13b3c55e83c76e3e714e7e872e (diff)
Simplify CLKF_INTR by making it look at the saved interrupt level,
instead of the stack pointer.
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r--sys/arch/sparc64/include/cpu.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h
index 07f20f77a86..f0d2dad2501 100644
--- a/sys/arch/sparc64/include/cpu.h
+++ b/sys/arch/sparc64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.52 2007/10/31 22:46:52 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.53 2008/01/19 17:42:05 kettenis Exp $ */
/* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */
/*
@@ -179,19 +179,15 @@ void smp_signotify(struct proc *);
* Arguments to hardclock, softclock and gatherstats encapsulate the
* previous machine state in an opaque clockframe. The ipl is here
* 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;
+ int saved_intr_level;
};
#define CLKF_USERMODE(framep) (((framep)->t.tf_tstate & TSTATE_PRIV) == 0)
#define CLKF_PC(framep) ((framep)->t.tf_pc)
-#define CLKF_INTR(framep) ((!CLKF_USERMODE(framep))&&\
- (((framep)->t.tf_kstack < (vaddr_t)EINTSTACK)&&\
- ((framep)->t.tf_kstack > (vaddr_t)INTSTACK)))
+#define CLKF_INTR(framep) ((framep)->saved_intr_level != 0)
void setsoftnet(void);