Start using IPL_* constants from intr.h; phase out PIL_* in psl.h

This commit is contained in:
pk 2002-12-06 15:36:45 +00:00
parent f33f7a14c5
commit 060fa93542
2 changed files with 40 additions and 32 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.3 2001/09/27 02:05:42 mrg Exp $ */
/* $NetBSD: intr.h,v 1.4 2002/12/06 15:36:45 pk Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -36,20 +36,29 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* XXX - arbitrary numbers; no interpretation is defined yet */
/*
* Device class interrupt levels
* Note: sun4 and sun4c hardware only has software interrupt available
* on level 1, 4 or 6. This limits the choice of the various
* IPL_SOFT* symbols to one of those three values.
*/
#define IPL_NONE 0 /* nothing */
#define IPL_SOFTCLOCK 1 /* timeouts */
#define IPL_SOFTNET 1 /* protocol stack */
#define IPL_BIO 2 /* block I/O */
#define IPL_NET 3 /* network */
#define IPL_SOFTSERIAL 4 /* serial */
#define IPL_TTY 5 /* terminal */
#define IPL_IMP 6 /* memory allocation */
#define IPL_AUDIO 7 /* audio */
#define IPL_CLOCK 8 /* clock */
#define IPL_SERIAL 9 /* serial */
#define IPL_HIGH 10 /* everything */
#define IPL_SOFTAUDIO 4 /* second-level audio */
#define IPL_SOFTFDC 4 /* second-level floppy */
#define IPL_BIO 5 /* block I/O */
#define IPL_TTY 6 /* terminal */
#define IPL_SOFTSERIAL 6 /* serial */
#define IPL_IMP 7 /* memory allocation */
#define IPL_NET 7 /* network */
#define IPL_CLOCK 10 /* clock */
#define IPL_AUDIO 13 /* audio */
#define IPL_SERIAL 13 /* serial */
#define IPL_STATCLOCK 14 /* statclock */
#define IPL_HIGH 15 /* everything */
#if defined(_KERNEL) && !defined(_LOCORE)
void *
softintr_establish __P((int level, void (*fun)(void *), void *arg));
@ -57,3 +66,4 @@ void
softintr_disestablish __P((void *cookie));
#define softintr_schedule(cookie) setsoftint()
#endif /* KERNEL && !_LOCORE */

View File

@ -1,4 +1,4 @@
/* $NetBSD: psl.h,v 1.29 2001/06/08 01:33:32 uwe Exp $ */
/* $NetBSD: psl.h,v 1.30 2002/12/06 15:36:45 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@ -77,14 +77,9 @@
#define PSR_BITS "\20\16EC\15EF\10S\7PS\6ET"
/* Interesting spl()s */
#define PIL_SCSI 3
#define PIL_FDSOFT 4
#define PIL_AUSOFT 4
#define PIL_BIO 5
#define PIL_VIDEO 5
#define PIL_TTY 6
#define PIL_LPT 6
#define PIL_NET 7
#define PIL_FDSOFT IPL_SOFTFDC /* compat */
#define PIL_AUSOFT IPL_SOFTAUDIO /* compat */
#define PIL_TTY 6 /* compat */
#define PIL_CLOCK 10
#define PIL_FD 11
#define PIL_SER 13
@ -345,43 +340,46 @@ _SPLRAISE(splsoftint, 1)
/* audio software interrupts */
_SPLRAISE(splausoft, PIL_AUSOFT)
_SPLRAISE(splausoft, IPL_SOFTAUDIO)
/* floppy software interrupts */
_SPLRAISE(splfdsoft, PIL_FDSOFT)
_SPLRAISE(splfdsoft, IPL_SOFTFDC)
/* Block devices */
_SPLRAISE(splbio, 5)
_SPLRAISE(splbio, IPL_BIO)
/* tty input runs at software level 6 */
_SPLRAISE(spltty, PIL_TTY)
_SPLRAISE(spltty, IPL_TTY)
/* network hardware interrupts are at level 7 */
_SPLRAISE(splnet, PIL_NET)
_SPLRAISE(splnet, IPL_NET)
/*
* Memory allocation (must be as high as highest network, tty, or disk device)
*/
_SPLRAISE(splvm, 7)
_SPLRAISE(splvm, IPL_IMP)
/* clock interrupts at level 10 */
_SPLRAISE(splclock, PIL_CLOCK)
_SPLRAISE(splclock, IPL_CLOCK)
/* fd hardware, ts102, and tadpole microcontoller interrupts are at level 11 */
_SPLRAISE(splfd, 11)
_SPLRAISE(splts102, 11)
/* zs hardware interrupts are at level 12 */
/*
* zs hardware interrupts are at level 12
* su (com) hardware interrupts are at level 13
* IPL_SERIAL must protect them all.
*/
_SPLRAISE(splzs, 12)
/* su (com) hardware interrupts are at level 13 (protects zs as well) */
_SPLRAISE(splserial, 13)
_SPLRAISE(splserial, IPL_SERIAL)
/* audio hardware interrupts are at level 13 */
_SPLRAISE(splaudio, 13)
_SPLRAISE(splaudio, IPL_AUDIO)
/* second sparc timer interrupts at level 14 */
_SPLRAISE(splstatclock, 14)
_SPLRAISE(splstatclock, IPL_STATCLOCK)
static __inline int splhigh()
{