Skip to contentSkip to conversation

spin_locks without smp.

PATCH Manfred Spraul 2 participants 2 messages Jan 10, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Alan
Quoted 2 lines · William Lee Irwin III

Okay, what I'm getting here is that the UP case already has preempt disabled b/c the locks are taken in IRQ context?

The tx/timeout path isnt always in IRQ context.

It is.
tx and timeout are both called at BH context with the dev_xmit spinlock held. See Documentation/networking/netdevices.txt

What about

   disable_irq();
   spin_lock(&np->lock);

That's what 8390.c uses, no need for an #ifdef.

--
Manfred

#1 lore raw
Quoted 5 lines · Manfred Spraul
    disable_irq();
    spin_lock(&np->lock);

That's what 8390.c uses, no need for an #ifdef.

Does someone have a card they can test that on. If so then I agree entirely it is the best way to go