Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/x86/include/intr.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/x86/include/intr.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.15 retrieving revision 1.15.12.2 diff -u -p -r1.15 -r1.15.12.2 --- src/sys/arch/x86/include/intr.h 2004/10/31 10:39:34 1.15 +++ src/sys/arch/x86/include/intr.h 2006/12/30 20:47:22 1.15.12.2 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp $ */ +/* $NetBSD: intr.h,v 1.15.12.2 2006/12/30 20:47:22 yamt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -165,22 +165,7 @@ spllower(int nlevel) } } -/* - * Hardware interrupt masks - */ -#define splbio() splraise(IPL_BIO) -#define splnet() splraise(IPL_NET) -#define spltty() splraise(IPL_TTY) -#define splaudio() splraise(IPL_AUDIO) -#define splclock() splraise(IPL_CLOCK) -#define splstatclock() splclock() -#define splserial() splraise(IPL_SERIAL) -#define splipi() splraise(IPL_IPI) - -#define spllpt() spltty() - #define SPL_ASSERT_BELOW(x) KDASSERT(curcpu()->ci_ilevel < (x)) -#define spllpt() spltty() /* * Software interrupt masks @@ -190,20 +175,33 @@ spllower(int nlevel) */ #define spllowersoftclock() spllower(IPL_SOFTCLOCK) -#define splsoftclock() splraise(IPL_SOFTCLOCK) -#define splsoftnet() splraise(IPL_SOFTNET) -#define splsoftserial() splraise(IPL_SOFTSERIAL) - /* * Miscellaneous */ -#define splvm() splraise(IPL_VM) -#define splhigh() splraise(IPL_HIGH) #define spl0() spllower(IPL_NONE) -#define splsched() splraise(IPL_SCHED) -#define spllock() splhigh() #define splx(x) spllower(x) +typedef uint8_t ipl_t; +typedef struct { + ipl_t _ipl; +} ipl_cookie_t; + +static inline ipl_cookie_t +makeiplcookie(ipl_t ipl) +{ + + return (ipl_cookie_t){._ipl = ipl}; +} + +static inline int +splraiseipl(ipl_cookie_t icookie) +{ + + return splraise(icookie._ipl); +} + +#include + /* * Software interrupt registration * @@ -216,7 +214,7 @@ softintr(int sir) { struct cpu_info *ci = curcpu(); - __asm __volatile("lock ; orl %1, %0" : + __asm volatile("lock ; orl %1, %0" : "=m"(ci->ci_ipending) : "ir" (1 << sir)); } @@ -255,6 +253,7 @@ void intr_add_pcibus(struct pcibus_attac const char *intr_string(int); void cpu_intr_init(struct cpu_info *); int intr_find_mpmapping(int, int, int *); +struct pic *intr_findpic(int); #ifdef INTRDEBUG void intr_printconfig(void); #endif