aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/irq_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:28 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:53 -0400
commit497c9a195db918d3f035e8cb3021e5d4d035516e (patch)
tree73df8764a812f2d6d2bd81d6a1d671008a0d212b /arch/x86/kernel/irq_32.c
parent199751d715bba5b469ea22adadc68a4166bfa4f5 (diff)
x86: make 32bit support per_cpu vector
so we can merge io_apic_32.c and io_apic_64.c v2: Use cpu_online_map as target cpus for bigsmp, just like 64-bit is doing. Also remove some unused TARGET_CPUS macro. v3: need to check if desc is null in smp_irq_move_cleanup also migration needs to reset vector too, so copy __target_IO_APIC_irq from 64bit. (the duplication will go away once the two files are unified.) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irq_32.c')
-rw-r--r--arch/x86/kernel/irq_32.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 0a57e39159a..b51ffdcfa31 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -223,21 +223,25 @@ unsigned int do_IRQ(struct pt_regs *regs)
223{ 223{
224 struct pt_regs *old_regs; 224 struct pt_regs *old_regs;
225 /* high bit used in ret_from_ code */ 225 /* high bit used in ret_from_ code */
226 int overflow, irq = ~regs->orig_ax; 226 int overflow;
227 unsigned vector = ~regs->orig_ax;
227 struct irq_desc *desc; 228 struct irq_desc *desc;
229 unsigned irq;
228 230
229 desc = irq_to_desc(irq);
230 if (unlikely(!desc)) {
231 printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
232 __func__, irq);
233 BUG();
234 }
235 231
236 old_regs = set_irq_regs(regs); 232 old_regs = set_irq_regs(regs);
237 irq_enter(); 233 irq_enter();
234 irq = __get_cpu_var(vector_irq)[vector];
238 235
239 overflow = check_stack_overflow(); 236 overflow = check_stack_overflow();
240 237
238 desc = irq_to_desc(irq);
239 if (unlikely(!desc)) {
240 printk(KERN_EMERG "%s: cannot handle IRQ %d vector %#x\n",
241 __func__, irq, vector);
242 BUG();
243 }
244
241 if (!execute_on_irq_stack(overflow, desc, irq)) { 245 if (!execute_on_irq_stack(overflow, desc, irq)) {
242 if (unlikely(overflow)) 246 if (unlikely(overflow))
243 print_stack_overflow(); 247 print_stack_overflow();