1 1.19 is /* $NetBSD: psl.h,v 1.19 2001/05/27 20:22:57 is Exp $ */ 2 1.7 cgd 3 1.6 chopps #ifndef _MACHINE_PSL_H_ 4 1.6 chopps #define _MACHINE_PSL_H_ 5 1.1 mw 6 1.4 mw #include <m68k/psl.h> 7 1.5 chopps 8 1.8 veego #if defined(_KERNEL) && !defined(_LOCORE) 9 1.18 is 10 1.19 is #if !defined(_LKM) 11 1.18 is #include "opt_lev6_defer.h" 12 1.19 is #endif 13 1.8 veego 14 1.14 thorpej #define spl0() _spl0() /* we have real software interrupts */ 15 1.8 veego 16 1.14 thorpej #define splnone() spl0() 17 1.14 thorpej #define spllowersoftclock() spl1() 18 1.8 veego 19 1.14 thorpej #define splsoftclock() splraise1() 20 1.14 thorpej #define splsoftnet() splraise1() 21 1.14 thorpej #define splbio() splraise3() 22 1.14 thorpej #define splnet() splraise3() 23 1.11 is 24 1.11 is /* 25 1.12 is * splserial hack, idea by Jason Thorpe. 26 1.12 is * drivers which need it (at the present only the coms) raise the variable to 27 1.13 kleink * their serial interrupt level. 28 1.11 is * 29 1.12 is * serialspl is statically initialized in machdep.c at the moment; should 30 1.11 is * be some driver independent file. 31 1.11 is * 32 1.12 is * XXX should serialspl be volatile? I think not; it is intended to be set only 33 1.11 is * during xxx_attach() time, and will be used only later. 34 1.11 is * -is 35 1.11 is */ 36 1.11 is 37 1.12 is extern u_int16_t amiga_serialspl; 38 1.14 thorpej #define splserial() _splraise(amiga_serialspl) 39 1.14 thorpej #define spltty() splraise4() 40 1.17 thorpej #define splvm() splraise4() 41 1.11 is 42 1.19 is #ifndef _LKM 43 1.19 is 44 1.8 veego #ifndef LEV6_DEFER 45 1.14 thorpej #define splclock() splraise6() 46 1.14 thorpej #define splstatclock() splraise6() 47 1.8 veego #define splhigh() spl7() 48 1.8 veego #define splsched() spl7() 49 1.15 thorpej #define spllock() spl7() 50 1.8 veego #else 51 1.14 thorpej #define splclock() splraise4() 52 1.14 thorpej #define splstatclock() splraise4() 53 1.14 thorpej #define splhigh() splraise4() 54 1.14 thorpej #define splsched() splraise4() 55 1.15 thorpej #define spllock() splraise4() 56 1.5 chopps #endif 57 1.19 is 58 1.19 is #else /* _LKM */ 59 1.19 is 60 1.19 is extern int _spllkm6(void); 61 1.19 is extern int _spllkm7(void); 62 1.19 is 63 1.19 is #define splclock() _spllkm6() 64 1.19 is #define splstatclock() _spllkm6() 65 1.19 is #define spllock() _spllkm7() 66 1.19 is #define splhigh() _spllkm7() 67 1.19 is #define splsched() _spllkm7() 68 1.19 is 69 1.19 is #endif /* _LKM */ 70 1.8 veego 71 1.14 thorpej #define splx(s) _spl(s) 72 1.8 veego 73 1.8 veego #endif /* KERNEL && !_LOCORE */ 74 1.8 veego #endif /* _MACHINE_PSL_H_ */ 75