Re: [2.2.8] undefined reference to `disable_irq_nosync' (+ fix)

Andrea Arcangeli (andrea@e-mind.com)
Thu, 13 May 1999 18:46:18 +0200 (CEST)


On Wed, 12 May 1999, Ivan Kokshaysky wrote:

>No, your patch breaks 8390.c on an i386 SMP. I think this one is
>correct (BTW the same fix is already in the Arm tree).

Does the ARM port support SMP? If so the patch below is wrong for the ARM
port.

Since Alpha supports SMP, the patch below is wrong for Alpha and right now
Alpha (and I also checked Sparc64) had a SMP racing disable_irq().

disable_irq(`N') must make sure that there aren't irq `N' running before
returning. It must also make sure that once it's returned there won't be
irq `N' running until enable_irq(`N') will be run.

disable_irq_nosync() instead will make sure that there won't be irq
running on the same cpu who previously run disable_irq_nosync() (this will
obviously allow a bit better SMP scalability in piece of code that want to
disable irq to use spin_lock without clearing irq locally).

I tryied to fix the SMP race in the Alpha code last night (even if I don't
have an Alpha so who knows if it compiles/boot ;). Please look at my email
of yesterday with subject `[patch] disable_irq was disable_irq_nosync...'.

Andrea Arcangeli

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