Commit 14bb1c15 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: remove multiple IRQ optimisation

ppc64 has an optimisation where it loops on get_irq until there are no more
interrupts to be handled.  Mark Hack notes that this optimisation hardly
ever hits and costs us a potentially expensive extra read of an interrupt
register every interrupt.

Also make do_IRQ void, the callers never use the return value.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8d7ae791
......@@ -589,7 +589,7 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
}
#ifdef CONFIG_PPC_ISERIES
int do_IRQ(struct pt_regs *regs)
void do_IRQ(struct pt_regs *regs)
{
struct paca_struct *lpaca;
struct ItLpQueue *lpq;
......@@ -629,15 +629,13 @@ int do_IRQ(struct pt_regs *regs)
/* Signal a fake decrementer interrupt */
timer_interrupt(regs);
}
return 1; /* lets ret_from_int know we can do checks */
}
#else /* CONFIG_PPC_ISERIES */
int do_IRQ(struct pt_regs *regs)
void do_IRQ(struct pt_regs *regs)
{
int irq, first = 1;
int irq;
irq_enter();
......@@ -656,25 +654,15 @@ int do_IRQ(struct pt_regs *regs)
}
#endif
/*
* Every arch is required to implement ppc_md.get_irq.
* This function will either return an irq number or -1 to
* indicate there are no more pending. But the first time
* through the loop this means there wasn't an IRQ pending.
* The value -2 is for buggy hardware and means that this IRQ
* has already been handled. -- Tom
*/
while ((irq = ppc_md.get_irq(regs)) >= 0) {
irq = ppc_md.get_irq(regs);
if (irq >= 0)
ppc_irq_dispatch_handler(regs, irq);
first = 0;
}
if (irq != -2 && first)
else
/* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts++;
irq_exit();
return 1; /* lets ret_from_int know we can do checks */
}
#endif /* CONFIG_PPC_ISERIES */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment