i8259.c spinlocks unnecessary

3 messages, 2 authors, 2002-06-29 · open the first message on its own page

i8259.c spinlocks unnecessary

From: Cort Dougan <hidden>
Date: 2002-06-28 21:29:29

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/

Re: i8259.c spinlocks unnecessary

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2002-06-29 13:55:42

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/

Re: i8259.c spinlocks unnecessary

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2002-06-29 14:28:33

irc.c don't have a global spinlock, only per-desc locks, so you can well
 irq.c

I should sleep more ;)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help