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