[PATCH] powerpc/mpic: improve interrupt handling performance
Michael Ellerman
michael at ellerman.id.au
Mon May 11 12:14:07 EST 2009
On Fri, 2009-05-08 at 17:08 -0500, Kumar Gala wrote:
> Before when we were setting up the irq host map for mpic we passed in
> just isu_size for the size of the linear map. However, for a number of
> mpic implementations we have no isu (thus pass in 0) and will end up
> with a no linear map (size = 0). This causes us to always call
> irq_find_mapping() from mpic_get_irq().
>
> By moving the allocation of the host map to after we've determined the
> number of sources we can actually benefit from having a linear map for
> the non-isu users that covers all the interrupt sources.
That's a nasty bug, so I think we should do:
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 7d46e5d..2b958d6 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -537,6 +537,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
}
break;
case IRQ_HOST_MAP_LINEAR:
+ WARN_ON(revmap_arg == 0);
rmap = (unsigned int *)(host + 1);
for (i = 0; i < revmap_arg; i++)
rmap[i] = NO_IRQ;
To save anyone else the embarrassment :)
cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090511/8735b6e9/attachment.pgp>
More information about the Linuxppc-dev
mailing list