Skip to contentSkip to conversation

i8259.c spinlocks unnecessary

DISCUSSION Cort Dougan 2 participants 3 messages Jun 28, 2002 – Jun 29, 2002

lore
Share & tools
lore
#0 lore raw

I looked through the 8259 code and I believe the spinlocks there are unnecessary. The code is covered by a spinlock when called from irq.c.

I instrumented the code and after running quite some time my code review matches what I've seen.

Anyone comment? Does someone want to remove them?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 9 lines

I looked through the 8259 code and I believe the spinlocks there are unnecessary. The code is covered by a spinlock when called from irq.c.

I instrumented the code and after running quite some time my code review matches what I've seen.

Anyone comment? Does someone want to remove them?

irc.c don't have a global spinlock, only per-desc locks, so you can well have one CPU dealing with an incoming interrupt and another CPU doing a disable/enable_irq() on a different interrupt at the same time for example. My understanding is that i8259 should be protected against such races.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/