Subject: Re: Interrupt sharing
To: Donald Lee <MacPPC1@caution.icompute.com>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 12/05/2004 20:57:27
Hello,

> This sounds really familiar.  I have seen something similar with my
> Cyclades serial card.  I am convinced that interrupts get "lost".
> I ended up "fixing it" by implementing a poll that processes the
> by occasionally calling the interrupt handler directly from an
> event loop.  Ugly, but it works.

I've been reading some Linux code again ( yeah, the evil empire - but reading the comments about problems and workarounds they used may yield some insight, especially since I didn't find any docs )

Like this:

/*
* Mark an irq as "lost". This is only used on the pmac
* since it can lose interrupts (see pmac_set_irq_mask).
* -- Cort
*/
So apparently they had the same problem.

Then this:
/*
* Unfortunately, setting the bit in the enable register
* when the device interrupt is already on *doesn't* set
* the bit in the flag register or request another interrupt.
*/
So here we have our race - or at least a possible race. Maybe it helps to OR the line level register over the interrupt register to catch this.

have fun
Michael