Re: Interrupt Handler Invocation

From: Alan Cox
Date: Thu Sep 18 2008 - 14:27:10 EST


On Thu, 18 Sep 2008 23:27:30 +0530
"Singaravelan Nallasellan" <singaravelann@xxxxxxxxx> wrote:

> Hi,
>
> I am currently assuming that the ISR will be invoked repeatedly till
> the ISR says the IRQ is handled. Is it a valid assumption?
> Can somebody throw some light on whether ISR is invoked repeatedly
> when the ISR returns the IRQ is not handled?

That depends whether the IRQ is cleared

> What is the behaviour for edge or level triggered interrupts?

Hardware dependant.

IRQ_HANDLED isn't used to indicate that the IRQ was processed and some
magic should occur, it is used so that the kernel can detect stuck
interrupts.

Generally speaking if you get an edge triggered IRQ and nobody handles it
then it will be lost and you may get the IRQ line stuck unusable forever.
If you get a level triggered IRQ and nobody handles it you will get
stuck repeatedly calling the IRQ handler until the kernel shuts that IRQ
off entirely to try and keep going.

--
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/