intrdefs.h revision 1.2.2.3 1 /* $NetBSD: intrdefs.h,v 1.2.2.3 2005/04/28 11:26:06 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_VM 0x9 /* memory allocation */
35 #define IPL_AUDIO 0xa /* audio */
36 #define IPL_CLOCK 0xb /* clock */
37 #define IPL_SCHED IPL_CLOCK
38 #define IPL_HIGH 0xc /* everything */
39 #define IPL_SERIAL 0xc /* serial */
40 #define IPL_IPI 0xd /* inter-processor interrupts */
41 #define IPL_DEBUG 0xe /* debug events */
42 #define IPL_DIE 0xf /* die events */
43 #define NIPL 16
44
45 /* Soft interrupt masks. */
46 #define SIR_CLOCK IPL_SOFTCLOCK
47 #define SIR_NET IPL_SOFTNET
48 #define SIR_SERIAL IPL_SOFTSERIAL
49 #define SIR_XENEVT IPL_SOFTXENEVT
50
51 #define IREENT_MAGIC 0x18041969
52
53 /* Interrupt sharing types (for ISA) */
54 #define IST_NONE 0 /* none */
55 #define IST_PULSE 1 /* pulsed */
56 #define IST_EDGE 2 /* edge-triggered */
57 #define IST_LEVEL 3 /* level-triggered */
58
59 #endif /* _XEN_INTRDEFS_H */
60