intrdefs.h revision 1.6.26.1 1 /* $NetBSD: intrdefs.h,v 1.6.26.1 2007/11/27 19:36:08 joerg 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 /*
49 * Local APIC masks and software interrupt masks, in order
50 * of priority. Must not conflict with SIR_* below.
51 */
52 #define LIR_IPI 31
53 #define LIR_TIMER 30
54
55 /* Soft interrupt masks. */
56 #define SIR_CLOCK IPL_SOFTCLOCK
57 #define SIR_NET IPL_SOFTNET
58 #define SIR_SERIAL IPL_SOFTSERIAL
59 #define SIR_XENEVT IPL_SOFTXENEVT
60
61 #define IREENT_MAGIC 0x18041969
62
63 /* Interrupt sharing types (for ISA) */
64 #define IST_NONE 0 /* none */
65 #define IST_PULSE 1 /* pulsed */
66 #define IST_EDGE 2 /* edge-triggered */
67 #define IST_LEVEL 3 /* level-triggered */
68
69 #define NUM_LEGACY_IRQS 16
70 #define MAX_INTR_SOURCES 32
71
72 #define X86_NIPI 7
73
74 #endif /* _XEN_INTRDEFS_H */
75