Re: Nested interrupt confusion

Richard B. Johnson (root@chaos.analogic.com)
Thu, 10 Jun 1999 16:22:56 -0400 (EDT)


On Thu, 10 Jun 1999, B. James Phillippe wrote:

> Greetings,
>
> With regard to hardware interrupt servicing on 2.2, how are nested
> interrupts handled on UP? From reading the code, it appears that they are
> possible on x86 (assuming no SA_INTERRUPT), but not on Alpha?
>
> If they are possible, is the depth limited only by memory for a new stack
> page..?
>

In UP in ix86, the two cascaded interrupt controllers are used. When an
interrupt occurs, before the driver ISR is called, that one particular
interrupt level is masked off. Therefore, the ISR will not be reentered.
When the ISR returns to the kernel code, that particular level is
reenabled. Therefore, even if the active ISR enabled interrupts, that
section of code won't be reentered.

Ref: Line 212, /linux/arch/i386/kernel/irq.c

Note if you are writing a driver, it is not a good idea to enable
interrupts in your ISR because the CPU will get taken away, slowing
down the speed at which your ISR is able to do its thing. Once you
get "behind", you have to resort to looping back in your ISR to see
if something else has happened that has to be handled. The result
being that you end up with a "polled" state-machine, rather than
an interrpt-driven state machine.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 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/