Subject: Re: OpenPIC / CPM2 PIC and cascading interrupt priorities

From: Benjamin Herrenschmidt <[email-masked]>
Date: Mon, 16 Feb 2009 08:04:20 +1100

> static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
> {
> 	int cascade_irq;
> 
> 	while ((cascade_irq = cpm2_get_irq()) >= 0)
> 		generic_handle_irq(cascade_irq);
> 
> 	desc->chip->eoi(irq);
> }

You can try doing an early EOI see that helps. Ie, stick it inside the loop,
after cpm_2_get_irq() and before generic_handle_irq() and see if that helps,
but make sure you do that EOI only once, ie, only on the first iteration.

Depending on how the CPM2 works, you may also be able to just get rid
of the loop... ie, if CPM2 output is level sensitive.

Ben.