diff options
author | 2008-01-19 17:42:05 +0000 | |
---|---|---|
committer | 2008-01-19 17:42:05 +0000 | |
commit | 79a31aba6b2b3766d75d7eca4c6d82b8a7e4a8d7 (patch) | |
tree | 48797c3f275a175e0141a909ad9708c5aa9f52f4 | |
parent | When I say commented out, I should comment it out before comitting. (diff) | |
download | wireguard-openbsd-79a31aba6b2b3766d75d7eca4c6d82b8a7e4a8d7.tar.xz wireguard-openbsd-79a31aba6b2b3766d75d7eca4c6d82b8a7e4a8d7.zip |
Simplify CLKF_INTR by making it look at the saved interrupt level,
instead of the stack pointer.
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 10 |
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); |