Re: [PATCH 2.6.16] Shared interrupts sometimes lost

From: Lee Revell
Date: Sun Apr 09 2006 - 14:25:02 EST


On Sun, 2006-04-09 at 12:12 -0600, Robert Hancock wrote:
> Lee Revell wrote:
> > Isn't a more typical IRQ handler:
> >
> > while (events = read_register(INTERRUPTS) != 0) {
> > ...handle each bit in events and ACK it...
> > }
>
> That would be less efficient, it would read the register twice or more
> if any events have been set, and reading device registers can be
> expensive. In the unlikely event the event was set while inside the
> ISR the interrupt should be asserted again so there is no need to do
> this.

OK. FWIW I am looking at the emu10k1 driver (though I've seen this in
others). The OSS driver has this comment:

/*
** NOTE :
** We do a 'while loop' here cos on certain machines, with both
** playback and recording going on at the same time, IRQs will
** stop coming in after a while. Checking IPND indeed shows that
** there are interrupts pending but the PIC says no IRQs pending.
** I suspect that some boards need edge-triggered IRQs but are not
** getting that condition if we don't completely clear the IPND
** (make sure no more interrupts are pending).
** - Eric
*/

The ALSA driver preserves the while loop but omits the comment :-/

Lee



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/