Skip to contentSkip to conversation

Kernel Semaphores

DISCUSSION Kevin D. Kissell 2 participants 2 messages Dec 6, 1999 MIPS

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines
Quoted 3 lines

To make it work on 32-bit CPUs, I looked at using the x386 model, but that one uses interrupt disables and is intrinsically SMP-unsafe.

semaphore-helper.h uses spin_lock_irqsave which is smp-safe. The way we do things for 64-bit MIPS is just more performant.

spin_lock_irqsave() in 2.2.12 for MIPS is just a save_and_cli(). The MIPS spin_lock macros all collapse the lock into nothingness.

#1 lore raw
Quoted 9 lines · Kevin D. Kissell
Quoted 6 lines
Quoted 3 lines

To make it work on 32-bit CPUs, I looked at using the x386 model, but that one uses interrupt disables and is intrinsically SMP-unsafe.

semaphore-helper.h uses spin_lock_irqsave which is smp-safe. The way we do things for 64-bit MIPS is just more performant.

spin_lock_irqsave() in 2.2.12 for MIPS is just a save_and_cli(). The MIPS spin_lock macros all collapse the lock into nothingness.

Spinlocks are SMP safe; it's just the MIPS implementation which doesn't get this right so far.

Ralf