diff options
author | Shaohua Li <shaohua.li@intel.com> | 2011-01-16 21:52:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-14 07:03:08 -0500 |
commit | 3a09fb4570a1cce11472b8e5da3f6ee409f529d5 (patch) | |
tree | 494c47eea548eb03465278467877ab2b64057883 /arch/x86/kernel/irqinit.c | |
parent | 60f6e65d7887c257392313755f95540ef5e7ea89 (diff) |
x86: Allocate 32 tlb_invalidate_interrupt handler stubs
Add up to 32 invalidate_interrupt handlers. How many handlers are
added depends on NUM_INVALIDATE_TLB_VECTORS. So if
NUM_INVALIDATE_TLB_VECTORS is smaller than 32, we reduce code
size.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <1295232725.1949.708.camel@sli10-conroe>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irqinit.c')
-rw-r--r-- | arch/x86/kernel/irqinit.c | 79 |
1 files changed, 71 insertions, 8 deletions
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index c752e973958d..7aad10a63e04 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
@@ -164,14 +164,77 @@ static void __init smp_intr_init(void) | |||
164 | alloc_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt); | 164 | alloc_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt); |
165 | 165 | ||
166 | /* IPIs for invalidation */ | 166 | /* IPIs for invalidation */ |
167 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+0, invalidate_interrupt0); | 167 | #define ALLOC_INVTLB_VEC(NR) \ |
168 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+1, invalidate_interrupt1); | 168 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+NR, \ |
169 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+2, invalidate_interrupt2); | 169 | invalidate_interrupt##NR) |
170 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+3, invalidate_interrupt3); | 170 | |
171 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+4, invalidate_interrupt4); | 171 | switch (NUM_INVALIDATE_TLB_VECTORS) { |
172 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+5, invalidate_interrupt5); | 172 | default: |
173 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+6, invalidate_interrupt6); | 173 | ALLOC_INVTLB_VEC(31); |
174 | alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+7, invalidate_interrupt7); | 174 | case 31: |
175 | ALLOC_INVTLB_VEC(30); | ||
176 | case 30: | ||
177 | ALLOC_INVTLB_VEC(29); | ||
178 | case 29: | ||
179 | ALLOC_INVTLB_VEC(28); | ||
180 | case 28: | ||
181 | ALLOC_INVTLB_VEC(27); | ||
182 | case 27: | ||
183 | ALLOC_INVTLB_VEC(26); | ||
184 | case 26: | ||
185 | ALLOC_INVTLB_VEC(25); | ||
186 | case 25: | ||
187 | ALLOC_INVTLB_VEC(24); | ||
188 | case 24: | ||
189 | ALLOC_INVTLB_VEC(23); | ||
190 | case 23: | ||
191 | ALLOC_INVTLB_VEC(22); | ||
192 | case 22: | ||
193 | ALLOC_INVTLB_VEC(21); | ||
194 | case 21: | ||
195 | ALLOC_INVTLB_VEC(20); | ||
196 | case 20: | ||
197 | ALLOC_INVTLB_VEC(19); | ||
198 | case 19: | ||
199 | ALLOC_INVTLB_VEC(18); | ||
200 | case 18: | ||
201 | ALLOC_INVTLB_VEC(17); | ||
202 | case 17: | ||
203 | ALLOC_INVTLB_VEC(16); | ||
204 | case 16: | ||
205 | ALLOC_INVTLB_VEC(15); | ||
206 | case 15: | ||
207 | ALLOC_INVTLB_VEC(14); | ||
208 | case 14: | ||
209 | ALLOC_INVTLB_VEC(13); | ||
210 | case 13: | ||
211 | ALLOC_INVTLB_VEC(12); | ||
212 | case 12: | ||
213 | ALLOC_INVTLB_VEC(11); | ||
214 | case 11: | ||
215 | ALLOC_INVTLB_VEC(10); | ||
216 | case 10: | ||
217 | ALLOC_INVTLB_VEC(9); | ||
218 | case 9: | ||
219 | ALLOC_INVTLB_VEC(8); | ||
220 | case 8: | ||
221 | ALLOC_INVTLB_VEC(7); | ||
222 | case 7: | ||
223 | ALLOC_INVTLB_VEC(6); | ||
224 | case 6: | ||
225 | ALLOC_INVTLB_VEC(5); | ||
226 | case 5: | ||
227 | ALLOC_INVTLB_VEC(4); | ||
228 | case 4: | ||
229 | ALLOC_INVTLB_VEC(3); | ||
230 | case 3: | ||
231 | ALLOC_INVTLB_VEC(2); | ||
232 | case 2: | ||
233 | ALLOC_INVTLB_VEC(1); | ||
234 | case 1: | ||
235 | ALLOC_INVTLB_VEC(0); | ||
236 | break; | ||
237 | } | ||
175 | 238 | ||
176 | /* IPI for generic function call */ | 239 | /* IPI for generic function call */ |
177 | alloc_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt); | 240 | alloc_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt); |