Re: linux interrupt handling problem

Richard B. Johnson (root@chaos.analogic.com)
Tue, 9 Nov 1999 08:39:16 -0500 (EST)


On Tue, 9 Nov 1999, Roman Zippel wrote:

> Hi,
>
> On Mon, 8 Nov 1999, Richard B. Johnson wrote:
>
> > This should work if you must enable interrupts in the interrupt handler.
> >
> > static void device_isr (int irq, void *p, struct pt_regs *regs)
> > {
> > INFO *inf = (INFO *) p;
> > if(inf->busy++)
> > return;
> > while(inf->busy--) /* Check this with interrupts off */
> > do_stuff(); /* If necessary with interrupts enabled */
> > return;
> > }
>
> This doesn't work without an interrupt controller.
> You forget that the interrupt has to be acknowledged, so you have to
> disable interrupts before this and enable them within do_stuff()
> explicitly again, that makes writing interrupt handler more complex and
> destroys interrupt perfomance again.
>
> bye, Roman
>

It works fine without an interrupt controller. It works in the Power PC.
Please look at the dispatch handler in ../arch/ppc/kernel/irq.c.

Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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