1
2 #ifndef _ASM_X86_IRQ_VECTORS_H
3 #define _ASM_X86_IRQ_VECTORS_H
4
5 #include <linux/threads.h>
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #define NMI_VECTOR 0x02
30 #define MCE_VECTOR 0x12
31
32
33
34
35
36 #define FIRST_EXTERNAL_VECTOR 0x20
37
38
39
40
41
42
43 #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR
44
45 #define IA32_SYSCALL_VECTOR 0x80
46
47
48
49
50
51 #define ISA_IRQ_VECTOR(irq) (((FIRST_EXTERNAL_VECTOR + 16) & ~15) + irq)
52
53
54
55
56
57
58
59
60
61 #define SPURIOUS_APIC_VECTOR 0xff
62
63
64
65 #if ((SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F)
66 # error SPURIOUS_APIC_VECTOR definition error
67 #endif
68
69 #define ERROR_APIC_VECTOR 0xfe
70 #define RESCHEDULE_VECTOR 0xfd
71 #define CALL_FUNCTION_VECTOR 0xfc
72 #define CALL_FUNCTION_SINGLE_VECTOR 0xfb
73 #define THERMAL_APIC_VECTOR 0xfa
74 #define THRESHOLD_APIC_VECTOR 0xf9
75 #define REBOOT_VECTOR 0xf8
76
77
78
79
80 #define X86_PLATFORM_IPI_VECTOR 0xf7
81
82
83
84
85 #define IRQ_WORK_VECTOR 0xf6
86
87 #define UV_BAU_MESSAGE 0xf5
88 #define DEFERRED_ERROR_VECTOR 0xf4
89
90
91 #define HYPERVISOR_CALLBACK_VECTOR 0xf3
92
93
94 #ifdef CONFIG_HAVE_KVM
95 #define POSTED_INTR_VECTOR 0xf2
96 #define POSTED_INTR_WAKEUP_VECTOR 0xf1
97 #define POSTED_INTR_NESTED_VECTOR 0xf0
98 #endif
99
100 #define MANAGED_IRQ_SHUTDOWN_VECTOR 0xef
101
102 #if IS_ENABLED(CONFIG_HYPERV)
103 #define HYPERV_REENLIGHTENMENT_VECTOR 0xee
104 #define HYPERV_STIMER0_VECTOR 0xed
105 #endif
106
107 #define LOCAL_TIMER_VECTOR 0xec
108
109 #define NR_VECTORS 256
110
111 #ifdef CONFIG_X86_LOCAL_APIC
112 #define FIRST_SYSTEM_VECTOR LOCAL_TIMER_VECTOR
113 #else
114 #define FIRST_SYSTEM_VECTOR NR_VECTORS
115 #endif
116
117
118
119
120
121
122
123
124
125
126
127
128 #define NR_IRQS_LEGACY 16
129
130 #define CPU_VECTOR_LIMIT (64 * NR_CPUS)
131 #define IO_APIC_VECTOR_LIMIT (32 * MAX_IO_APICS)
132
133 #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_PCI_MSI)
134 #define NR_IRQS \
135 (CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \
136 (NR_VECTORS + CPU_VECTOR_LIMIT) : \
137 (NR_VECTORS + IO_APIC_VECTOR_LIMIT))
138 #elif defined(CONFIG_X86_IO_APIC)
139 #define NR_IRQS (NR_VECTORS + IO_APIC_VECTOR_LIMIT)
140 #elif defined(CONFIG_PCI_MSI)
141 #define NR_IRQS (NR_VECTORS + CPU_VECTOR_LIMIT)
142 #else
143 #define NR_IRQS NR_IRQS_LEGACY
144 #endif
145
146 #endif