diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-11-09 13:28:33 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-11-09 13:28:33 +1100 |
commit | b709c0832824da20a32a3119911b9f0cf6970452 (patch) | |
tree | 1bf6e461f754aee5dbd870072080b5e5f2c1ee8c /arch/ppc64/kernel/irq.c | |
parent | 66ba135c5a398df5c3a4b43d84d9df80cbc87c61 (diff) | |
download | linux-b709c0832824da20a32a3119911b9f0cf6970452.tar.gz linux-b709c0832824da20a32a3119911b9f0cf6970452.tar.bz2 linux-b709c0832824da20a32a3119911b9f0cf6970452.zip |
ppc64: move stack switching up in interrupt processing
This will make the ppc64 multiplatform irq handling more like
the generic handling.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/ppc64/kernel/irq.c')
-rw-r--r-- | arch/ppc64/kernel/irq.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c index 87474584033f..b61497d5be28 100644 --- a/arch/ppc64/kernel/irq.c +++ b/arch/ppc64/kernel/irq.c @@ -157,9 +157,6 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq) int cpu = smp_processor_id(); irq_desc_t *desc = get_irq_desc(irq); irqreturn_t action_ret; -#ifdef CONFIG_IRQSTACKS - struct thread_info *curtp, *irqtp; -#endif kstat_cpu(cpu).irqs[irq]++; @@ -227,20 +224,7 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq) for (;;) { spin_unlock(&desc->lock); -#ifdef CONFIG_IRQSTACKS - /* Switch to the irq stack to handle this */ - curtp = current_thread_info(); - irqtp = hardirq_ctx[smp_processor_id()]; - if (curtp != irqtp) { - irqtp->task = curtp->task; - irqtp->flags = 0; - action_ret = call_handle_IRQ_event(irq, regs, action, irqtp); - irqtp->task = NULL; - if (irqtp->flags) - set_bits(irqtp->flags, &curtp->flags); - } else -#endif - action_ret = handle_IRQ_event(irq, regs, action); + action_ret = handle_IRQ_event(irq, regs, action); spin_lock(&desc->lock); if (!noirqdebug) @@ -310,6 +294,9 @@ void do_IRQ(struct pt_regs *regs) void do_IRQ(struct pt_regs *regs) { int irq; +#ifdef CONFIG_IRQSTACKS + struct thread_info *curtp, *irqtp; +#endif irq_enter(); @@ -330,9 +317,22 @@ void do_IRQ(struct pt_regs *regs) irq = ppc_md.get_irq(regs); - if (irq >= 0) - ppc_irq_dispatch_handler(regs, irq); - else + if (irq >= 0) { +#ifdef CONFIG_IRQSTACKS + /* Switch to the irq stack to handle this */ + curtp = current_thread_info(); + irqtp = hardirq_ctx[smp_processor_id()]; + if (curtp != irqtp) { + irqtp->task = curtp->task; + irqtp->flags = 0; + call_ppc_irq_dispatch_handler(regs, irq, irqtp); + irqtp->task = NULL; + if (irqtp->flags) + set_bits(irqtp->flags, &curtp->flags); + } else +#endif + ppc_irq_dispatch_handler(regs, irq); + } else /* That's not SMP safe ... but who cares ? */ ppc_spurious_interrupts++; |