Re: [PATCH] removal of unnecessary irq save/restore in tasklet_hi_schedule

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed Jul 26 2000 - 10:55:17 EST


On Wed, 26 Jul 2000, Stuart MacDonald wrote:
> >
> > No, hard-irq's _can_ be re-entered. One hard-irq cannot re-enter itself,
> > but you can have _different_ irq's enter each other. As such, to avoid
> > deadlock in on the local CPU the current code is needed..
>
> So the following is allowable?
>
> hard_irq_a() {
> ..
> hard_irq_b();
> ..
> }

Yes.

> hard_irq_b() {
> ..
> hard_irq_a();
> ..
> }

Yes.

> Then hard_irq_a has re-entered itself.

No.

Both of the above are allowable, BUT

        hard_irq_a()
                hard_irq_b()
                        hard_irq_a()

is not. We use the interrupt blocking hardware to make sure that as long
as irq A is running, further instances of irq A are blocked. OTHER
interrupts can still happen.

                Linus

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



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:21 EST