Home | History | Annotate | Line # | Download | only in include
intrdefs.h revision 1.2.2.2
      1  1.2.2.2  tron /*	$NetBSD: intrdefs.h,v 1.2.2.2 2005/04/28 10:20:11 tron Exp $	*/
      2  1.2.2.2  tron /*	NetBSD intrdefs.h,v 1.3 2003/06/16 20:01:06 thorpej Exp 	*/
      3  1.2.2.2  tron 
      4  1.2.2.2  tron #ifndef _XEN_INTRDEFS_H
      5  1.2.2.2  tron #define _XEN_INTRDEFS_H
      6  1.2.2.2  tron 
      7  1.2.2.2  tron /*
      8  1.2.2.2  tron  * Interrupt priority levels.
      9  1.2.2.2  tron  *
     10  1.2.2.2  tron  * There are tty, network and disk drivers that use free() at interrupt
     11  1.2.2.2  tron  * time, so imp > (tty | net | bio).
     12  1.2.2.2  tron  *
     13  1.2.2.2  tron  * Since run queues may be manipulated by both the statclock and tty,
     14  1.2.2.2  tron  * network, and disk drivers, clock > imp.
     15  1.2.2.2  tron  *
     16  1.2.2.2  tron  * IPL_HIGH must block everything that can manipulate a run queue.
     17  1.2.2.2  tron  *
     18  1.2.2.2  tron  * We need serial drivers to run at the absolute highest priority to
     19  1.2.2.2  tron  * avoid overruns, so serial > high.
     20  1.2.2.2  tron  * These are also used as index in the struct iplsource[] array, so each
     21  1.2.2.2  tron  * soft interrupt needs its own IPL level, not shared with anything else.
     22  1.2.2.2  tron  *
     23  1.2.2.2  tron  */
     24  1.2.2.2  tron 
     25  1.2.2.2  tron #define	IPL_NONE	0x0	/* nothing */
     26  1.2.2.2  tron #define	IPL_SOFTCLOCK	0x1	/* timeouts */
     27  1.2.2.2  tron #define	IPL_SOFTNET	0x2	/* protocol stacks */
     28  1.2.2.2  tron #define IPL_SOFTXENEVT	0x3	/* /dev/xenevt */
     29  1.2.2.2  tron #define	IPL_BIO		0x4	/* block I/O */
     30  1.2.2.2  tron #define	IPL_NET		0x5	/* network */
     31  1.2.2.2  tron #define	IPL_SOFTSERIAL	0x6	/* serial */
     32  1.2.2.2  tron #define	IPL_TTY		0x7	/* terminal */
     33  1.2.2.2  tron #define	IPL_VM		0x8	/* memory allocation */
     34  1.2.2.2  tron #define	IPL_AUDIO	0x9	/* audio */
     35  1.2.2.2  tron #define	IPL_CLOCK	0xa	/* clock */
     36  1.2.2.2  tron #define IPL_SCHED	IPL_CLOCK
     37  1.2.2.2  tron #define	IPL_HIGH	0xb	/* everything */
     38  1.2.2.2  tron #define	IPL_SERIAL	0xb	/* serial */
     39  1.2.2.2  tron #define IPL_IPI         0xc     /* inter-processor interrupts */
     40  1.2.2.2  tron #define IPL_DEBUG	0xd	/* debug events */
     41  1.2.2.2  tron #define IPL_DIE		0xe	/* die events */
     42  1.2.2.2  tron #define IPL_CTRL	0xf	/* control events */
     43  1.2.2.2  tron #define	NIPL		16
     44  1.2.2.2  tron 
     45  1.2.2.2  tron /* Soft interrupt masks. */
     46  1.2.2.2  tron #define SIR_CLOCK	IPL_SOFTCLOCK
     47  1.2.2.2  tron #define SIR_NET		IPL_SOFTNET
     48  1.2.2.2  tron #define SIR_SERIAL	IPL_SOFTSERIAL
     49  1.2.2.2  tron #define SIR_XENEVT	IPL_SOFTXENEVT
     50  1.2.2.2  tron 
     51  1.2.2.2  tron #define	IREENT_MAGIC	0x18041969
     52  1.2.2.2  tron 
     53  1.2.2.2  tron /* Interrupt sharing types (for ISA) */
     54  1.2.2.2  tron #define IST_NONE        0       /* none */
     55  1.2.2.2  tron #define IST_PULSE       1       /* pulsed */
     56  1.2.2.2  tron #define IST_EDGE        2       /* edge-triggered */
     57  1.2.2.2  tron #define IST_LEVEL       3       /* level-triggered */
     58  1.2.2.2  tron 
     59  1.2.2.2  tron #endif /* _XEN_INTRDEFS_H */
     60