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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]